summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-26 10:46:59 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-05-30 08:33:26 -0700
commit0ab0291b84b45f2389a019af2c88bf5169d14f64 (patch)
treeb1935225e76f2470640244918e3e1ae89ae88fb2 /Makefile
parent3a85279c0b02c3fcbe47f08743cace8550bf618e (diff)
downloadglibc-0ab0291b84b45f2389a019af2c88bf5169d14f64.tar.gz
Convert WORDSIZE[32|64]/ld entries to abi-variants
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 19 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c0a0cfb828..89588c1e8a 100644
--- a/Makefile
+++ b/Makefile
@@ -170,14 +170,29 @@ others: $(common-objpfx)testrun.sh
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
-ifeq ($(biarch),no)
+ifndef abi-variants
installed-stubs = $(inst_includedir)/gnu/stubs.h
else
-installed-stubs = $(inst_includedir)/gnu/stubs-$(biarch).h
+installed-stubs = $(inst_includedir)/gnu/stubs-$(default-abi).h
-$(inst_includedir)/gnu/stubs.h: include/stubs-biarch.h $(+force)
+$(inst_includedir)/gnu/stubs.h: $(common-objpfx)soversions.mk $(+force)
$(make-target-directory)
- $(INSTALL_DATA) $< $@
+ { \
+ echo '/* This file is automatically generated.';\
+ echo " This file selects the right generated file of \`__stub_FUNCTION' macros";\
+ echo ' based on the architecture being compiled for. */'; \
+ echo ''; \
+ $(foreach h,$(abi-includes), echo '#include <$(h)>';) \
+ echo ''; \
+ $(foreach v,$(abi-variants),\
+ $(if $(abi-$(v)-condition),\
+ echo '#if $(abi-$(v)-condition)'; \
+ echo '# include <gnu/stubs-$(v).h>'); \
+ $(if $(abi-$(v)-condition),echo '#endif';) \
+ rm -f $(@:.d=.h).new$(v); \
+ ) \
+ } > $(@:.d=.h).new
+ mv -f $(@:.d=.h).new $(@:.d=.h)
install-others-nosubdir: $(installed-stubs)
endif