aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-03-15 11:44:58 -0700
committerUlrich Drepper <drepper@redhat.com>2010-03-15 11:44:58 -0700
commit92ad15a8f1d3e65f20fda3265c04ff26a642a2d0 (patch)
tree93c8c2a25e18b5d8fe583b0a1f0679278ce481ca /Makerules
parent94db8db8e80d8b7fe094dee92660c158bf62d732 (diff)
downloadglibc-92ad15a8f1d3e65f20fda3265c04ff26a642a2d0.zip
glibc-92ad15a8f1d3e65f20fda3265c04ff26a642a2d0.tar.gz
glibc-92ad15a8f1d3e65f20fda3265c04ff26a642a2d0.tar.bz2
Implement handling of libc ABI in ELF header.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makerules b/Makerules
index 43fa5a7..d5ff383 100644
--- a/Makerules
+++ b/Makerules
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006,2007,2008,2009 Free Software Foundation, Inc.
+# Copyright (C) 1991-2006,2007,2008,2009,2010 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -109,6 +109,18 @@ $(common-objpfx)%.latest: $(common-objpfx)abi-versions.h
endif # avoid-generated
endif # $(versioning) = yes
+ifndef avoid-generated
+before-compile := $(common-objpfx)libc-abis.h $(before-compile)
+libc-abis := $(firstword $(wildcard $(foreach D,$(add-ons), $(..)libc-abis)) \
+ libc-abis)
+$(common-objpfx)libc-abis.h: $(..)scripts/gen-libc-abis $(libc-abis)
+ $(SHELL) $(..)scripts/gen-libc-abis \
+ $(base-machine)-$(config-vendor)-$(config-os) \
+ < $(libc-abis) > $@T
+ $(move-if-change) $@T $@
+common-generated += $(common-objpfx)libc-abis.h
+endif # avoid-generated
+
# Make sure the subdirectory for object files gets created.
ifdef objpfx
ifeq (,$(wildcard $(objpfx).))
@@ -1395,7 +1407,7 @@ $(objpfx)stubs: $(objs-for-stubs)
ifneq (,$(strip $(objs-for-stubs)))
(cd $(objpfx).; $(OBJDUMP) -h $(patsubst $(objpfx)%,%,$^)) | \
$(AWK) '/\.gnu\.glibc-stub\./ { \
- sub(/\.gnu\.glibc-stub\./, "", $$2); \
+ sub(/\.gnu\.glibc-stub\./, "", $$2); \
stubs[$$2] = 1; } \
END { for (s in stubs) print "#define __stub_" s }' > $@T
mv -f $@T $@