From ad10cac8a4d5874f6e7cd8cd6b4acbf86502a893 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jun 2001 07:10:50 +0000 Subject: Update. 2001-05-09 Michael Keezer * Makeconfig: Added AIX-ld support for DSO. * Makerules: Likewise. * dlfcn/Makefile (defaultmod1.so): Added libc_nonshared. (defaultmod2.so): Likewise. * debug/Makefile: Conditionalize use of elf/ld.so. * iconvdata/Makefile: Moved LDFLAG rpath/soname info into Makeconfig. * sysdeps/unix/sysv/aix/Makefile: Added dl-support.c and dl-error.c. * sysdeps/unix/sysv/aix/Makefile: Made (f/g)rsave(0/1) & (f/g)prrest(0/1) static only. * sysdeps/unix/sysv/aix/gettimeofday.c: Removed #if 0. * sysdeps/unix/sysv/aix/start.c: Define __dso_handle if not ELF but shared. * sysdeps/unix/sysv/aix/setitimer.c: New file. * sysdeps/unix/sysv/aix/sleep.c: New file. * sysdeps/unix/sysv/aix/usleep.c: New file. * sysdeps/unix/sysv/aix/dl-addr.c: New file. * sysdeps/unix/sysv/aix/dl-error.c: New file. * sysdeps/unix/sysv/aix/dl-support.c: New file. * sysdeps/unix/sysv/aix/powerpc/register-dump.h: New file. (BODY for TO_LOOP): Keep track of Unicode 3.1 language tag. I f "ja", prefer conversion to Japanese character sets. If "zh", prefer conversion to GB2312. I f "ko", prefer conversion to KSC5601. Small --- Makeconfig | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) (limited to 'Makeconfig') diff --git a/Makeconfig b/Makeconfig index 26884f82d2..3b9f62f5dc 100644 --- a/Makeconfig +++ b/Makeconfig @@ -423,6 +423,7 @@ endif endif ifndef link-libc ifeq (yes,$(build-shared)) +ifeq ($(elf),yes) # We need the versioned name of libc.so in the deps of $(others) et al # so that the symlink to libc.so is created before anything tries to # run the linked programs. @@ -431,6 +432,13 @@ link-libc = -Wl,-rpath-link=$(rpath-link) \ $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) # This is how to find at build-time things that will be installed there. rpath-dirs = math elf dlfcn nss nis rt resolv crypt +else +ifneq (,$(findstring aix,$(config-os))) +link-libc = $(common-objpfx)libc.so \ + $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) +rpath-dirs = math dlfcn nss nis rt resolv crypt +endif +endif rpath-link = \ $(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%))) elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf) @@ -441,6 +449,21 @@ link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a endif endif +# Differences in the linkers on the various platforms. +ifeq ($(elf),yes) +LDFLAGS-rpath-ORIGIN = -Wl,-rpath,'$$ORIGIN' +LDFLAGS-soname-fname = -Wl,-soname,$(@F) +LDFLAGS-rdynamic = -rdynamic +LDFLAGS-Bsymbolic = -Bsymbolic +else +ifneq (,$(findstring aix,$(config-os))) +LDFLAGS-rpath-ORIGIN = +LDFLAGS-soname-fname = +LDFLAGS-rdynamic = -Wl,-bdynamic +LDFLAGS-Bsymbolic = -Wl,-bsymbolic +endif +endif + # Choose the default search path for the dynamic linker based on # where we will install libraries. ifneq ($(libdir),$(slibdir)) @@ -493,7 +516,7 @@ elf-objpfx = $(common-objpfx)elf/ # How to run a program we just linked with our library. # The program binary is assumed to be $(word 2,$^). built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^)) -ifeq (yes,$(build-shared)) +ifeq (yesyes,$(build-shared)$(elf)) comma = , sysdep-library-path = \ $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\ @@ -758,6 +781,13 @@ postclean-generated += soversions.mk before-compile += $(common-objpfx)gnu/lib-names.h ifeq ($(soversions.mk-done),t) $(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp; @: +ifneq (,$(findstring aix,$(config-os))) +$(common-objpfx)gnu/lib-names.stmp: $(..)sysdeps/unix/sysv/aix/gnu/lib-names.h + $(make-target-directory) + @rm -f ${@:stmp=T} $@ + @cp $(..)sysdeps/unix/sysv/aix/gnu/lib-names.h $(common-objpfx)gnu + touch $@ +else $(common-objpfx)gnu/lib-names.stmp: $(common-objpfx)soversions.mk $(make-target-directory) @rm -f ${@:stmp=T} $@ @@ -786,6 +816,7 @@ $(common-objpfx)gnu/lib-names.stmp: $(common-objpfx)soversions.mk $(move-if-change) ${@:stmp=T} ${@:stmp=h} touch $@ endif +endif common-generated += gnu/lib-names.h gnu/lib-names.stmp @@ -815,10 +846,21 @@ else libdl = $(common-objpfx)dlfcn/libdl.a endif else -# No ELF - no libdl, at least for now. +ifneq (,$(findstring aix,$(config-os))) +ifeq ($(build-shared),yes) +dlfcn = dlfcn +libdl = $(common-objpfx)dlfcn/libdl.so$(libdl.so-version) +else +# No libdl without shared libs on AIX +dlfcn = +libdl = +endif +else +# No ELF, no AIX - no libdl, at least for now. dlfcn = libdl = endif +endif # These are the subdirectories containing the library source. The order # is more or less arbitrary. The sorting step will take care of the -- cgit v1.2.3