diff options
author | Nico Huber <nico.huber@secunet.com> | 2015-09-29 16:41:19 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2016-09-19 11:14:49 +0200 |
commit | be5492aec0a02e416cf12a7ad7517900540d9991 (patch) | |
tree | 2ca46cf377203c8146378bcc74a0be6317f09ef2 /src/lib/gnat/Makefile.inc | |
parent | 2e09d2b239ff2dfdba89011fd64d9a07da0d8717 (diff) |
Add minimal GNAT run time system (RTS)
Add a stripped-down version of libgnat. This is somehow comparable to
libgcc but for Ada programs. It's licensed under GPLv3 but with the
runtime library exception. So it's totally fine to link it with our
GPLv2 code and keep it under GPLv2.
Change-Id: Ie6522abf093f0a516b9ae18ddc69131bd721dc0c
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/11836
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Diffstat (limited to 'src/lib/gnat/Makefile.inc')
-rw-r--r-- | src/lib/gnat/Makefile.inc | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/lib/gnat/Makefile.inc b/src/lib/gnat/Makefile.inc new file mode 100644 index 0000000000..6ba274a7ef --- /dev/null +++ b/src/lib/gnat/Makefile.inc @@ -0,0 +1,62 @@ +## +## This file is part of the coreboot project. +## +## Copyright (C) 2016 Nico Huber <nico.h@gmx.de> +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +define libgnat-template +# $1 arch + +additional-dirs += $$(obj)/libgnat-$(1)/adainclude +additional-dirs += $$(obj)/libgnat-$(1)/adalib + +ADAFLAGS_libgnat-$(1) := \ + --RTS=$$(obj)/libgnat-$(1)/ \ + -gnatg \ + -gnatpg \ + -I$$(src)/lib/gnat/ \ + +libgnat-$(1)-y += a-unccon.ads +libgnat-$(1)-y += ada.ads +libgnat-$(1)-y += g-souinf.ads +libgnat-$(1)-y += gnat.ads +libgnat-$(1)-y += i-c.adb +libgnat-$(1)-y += i-c.ads +libgnat-$(1)-y += interfac.ads +libgnat-$(1)-y += s-atacco.ads +libgnat-$(1)-y += s-imenne.adb +libgnat-$(1)-y += s-imenne.ads +libgnat-$(1)-y += s-maccod.ads +libgnat-$(1)-y += s-parame.ads +libgnat-$(1)-y += s-stoele.adb +libgnat-$(1)-y += s-stoele.ads +libgnat-$(1)-y += s-unstyp.ads +libgnat-$(1)-y += system.ads + +# Copy bodies too for inlining +$$(obj)/libgnat-$(1)/libgnat.a: $$$$(libgnat-$(1)-objs) + cp $$(libgnat-$(1)-srcs) $$(libgnat-$(1)-extra-specs) \ + $$(obj)/libgnat-$(1)/adainclude/ + cp $$(libgnat-$(1)-alis) \ + $$(obj)/libgnat-$(1)/adalib/ + rm -f $$@ + @printf " AR $$(subst $$(obj)/,,$$(@))\n" + $$(AR_libgnat-$(1)) cr $$@ $$^ + +endef + + +$(foreach arch,$(standard-archs), \ + $(eval $(call define_class,libgnat-$(arch),$(arch)))) + +$(foreach arch,$(standard-archs), \ + $(eval $(call libgnat-template,$(arch)))) |