From 0ab0291b84b45f2389a019af2c88bf5169d14f64 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 26 May 2012 10:46:59 -0700 Subject: Convert WORDSIZE[32|64]/ld entries to abi-variants --- Makefile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c0a0cfb..89588c1 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 '); \ + $(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 -- cgit v1.1