summaryrefslogtreecommitdiff
path: root/libc/Makerules
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-02-08 16:44:31 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-02-08 16:44:31 +0000
commit78be84cd747c2e3965bf6c2fd5f702d6ff2f5525 (patch)
treec070a60ef7c5371bef8b7a559442a6920b394c8e /libc/Makerules
parentde06548e980675e65a1e6d850bb8c3a3f7ec638d (diff)
downloadeglibc2-78be84cd747c2e3965bf6c2fd5f702d6ff2f5525.tar.gz
Merge changes between r16568 and r17050 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@17051 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/Makerules')
-rw-r--r--libc/Makerules80
1 files changed, 1 insertions, 79 deletions
diff --git a/libc/Makerules b/libc/Makerules
index 554f4b649..e0fa0a886 100644
--- a/libc/Makerules
+++ b/libc/Makerules
@@ -431,7 +431,7 @@ xtests += $(xtests-y)
# Modify the list of routines we build for different targets
-ifeq (yesyes,$(build-shared)$(elf))
+ifeq (yes,$(build-shared))
ifndef libc.so-version
# Undefine this because it can't work when we libc.so is unversioned.
static-only-routines =
@@ -472,13 +472,8 @@ load-map-file = $(map-file:%=-Wl,--version-script=%)
# $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
# on other shared objects.
lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(+interp)
-ifneq (,$(findstring aix,$(config-os)))
- (echo '#!'; \
- dump -g $< | sed '1,6d' | cut -f2 | sort | uniq) > $(<:a=exp)
-endif
$(build-shlib)
-ifeq ($(elf),yes)
define build-shlib-helper
$(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) $(config-LDFLAGS) \
@@ -488,20 +483,7 @@ $(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
endef
-else
-ifneq (,$(findstring aix,$(config-os)))
-define build-shlib-helper
-$(LINK.o) -Wl,-G,-bM:SRE,-bnoentry,-bE:$(<:a=exp) \
- $(sysdep-LDFLAGS) $(config-LDFLAGS) $(extra-B-$(@F:lib%.so=%).so) \
- $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
- $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
- -L$(subst :, -L,$(rpath-link))
-endef
-else
-endif
-endif
-ifeq (yes,$(elf))
ifeq (yes,$(use-default-link))
# If the linker is good enough, we can let it use its default linker script.
shlib-lds =
@@ -550,30 +532,7 @@ define build-shlib
$(build-shlib-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-shlib-objlist)
endef
-else
-ifneq (,$(findstring aix,$(config-os)))
-define build-shlib
-$(build-shlib-helper) \
- -o $@ \
- $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
- $(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
-endef
-define build-shlib
-$(build-shlib-helper) \
- $(build-shlib-objlist)
-endef
-endif
-endif
-ifneq (,$(findstring aix,$(config-os)))
-define build-module-helper
-$(LINK.o) -Wl,-G -Wl,-bM:SRE -Wl,-bnoentry -Wl,-bexpall \
- $(sysdep-LDFLAGS) $(config-LDFLAGS) \
- $(load-map-file) \
- $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
- -L$(subst :, -L,$(rpath-link)) -Wl,-L=$(rpath-link)
-endef
-else
define build-module-helper
$(LINK.o) -shared $(static-libgcc) $(sysdep-LDFLAGS) $(config-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) \
@@ -581,11 +540,9 @@ $(LINK.o) -shared $(static-libgcc) $(sysdep-LDFLAGS) $(config-LDFLAGS) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
endef
-endif
# This macro is similar to build-shlib but it does not define a soname
# and it does not depend on the destination name to start with `lib'.
-ifeq (yes,$(elf))
# binutils only position loadable notes into the first page for binaries,
# not for shared objects
define build-module
@@ -597,23 +554,6 @@ $(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o \
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
endef
-else
-ifneq (,$(findstring aix,$(config-os)))
-define build-module
-$(build-module-helper) \
- -o $@ \
- $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
- $(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so)
-endef
-else
-define build-module
-define build-module
-$(build-module-helper) \
- -o $@ \
- $(build-module-objlist)
-endef
-endif
-endif
build-module-helper-objlist = \
$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
@@ -640,7 +580,6 @@ endif
# contains some of libc_pic.a already, which will prevent the COMMONs
# from being allocated in libc.so, which introduces evil dependencies
# between libc.so and ld.so, which can make it impossible to upgrade.
-ifeq ($(elf),yes)
$(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
$(LDFLAGS-c_pic.os) -Wl,-d $(whole-archive) $^ -o $@
@@ -687,23 +626,6 @@ $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
common-generated += libc.so$(libc.so-version)
endif
endif
-else
-ifneq (,$(findstring aix,$(config-os)))
-$(common-objpfx)libc.so: $(common-objpfx)libc_pic.a
- @rm -f $@
- (echo '#!'; \
- dump -g $^ | sed '1,6d' | cut -f2 | sort | uniq) > $(^:a=exp)
- sed '/__mulh/d;/__mull/d;/__divss/d;/__divus/d;/__quoss/d;/__quous/d' \
- /lib/syscalls.exp > $(common-objpfx)syscalls.exp
- $(LINK.o) -G -bM:SRE -bnoentry -bE:$(^:a=exp) \
- -bE:$(common-objpfx)syscalls.exp \
- -bI:$(common-objpfx)syscalls.exp \
- -L$(common-objpfx) -o $@ $^
-# AIX runtime ld wants libc.so to be libc.a(shr.o) hardwired
- cp $@ $(common-objpfx)shr.o
- $(AR) $(ARFLAGS) $(common-objpfx)libc.a $(common-objpfx)shr.o
-endif
-endif
# Figure out the source filenames in this directory.