summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-06-20 07:10:50 +0000
committerUlrich Drepper <drepper@redhat.com>2001-06-20 07:10:50 +0000
commitad10cac8a4d5874f6e7cd8cd6b4acbf86502a893 (patch)
tree55851a6afc1be5d786fce886daf3a528ba7a41f7 /Makerules
parent874e557059c1dfb945437826f477ed43b31871c7 (diff)
downloadglibc-ad10cac8a4d5874f6e7cd8cd6b4acbf86502a893.tar.gz
glibc-ad10cac8a4d5874f6e7cd8cd6b4acbf86502a893.tar.xz
glibc-ad10cac8a4d5874f6e7cd8cd6b4acbf86502a893.zip
Update.
2001-05-09  Michael Keezer  <mkeezer@redhat.com>

	* 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
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules65
1 files changed, 64 insertions, 1 deletions
diff --git a/Makerules b/Makerules
index 596f3cf3b0..56455e6d7b 100644
--- a/Makerules
+++ b/Makerules
@@ -351,7 +351,7 @@ endif
 
 # Modify the list of routines we build for different targets
 
-ifeq (yes,$(build-shared))
+ifeq (yesyes,$(build-shared)$(elf))
 ifndef libc.so-version
 # Undefine this because it can't work when we libc.so is unversioned.
 static-only-routines =
@@ -392,8 +392,13 @@ endif
 # $(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 -Wl,-O1 $(sysdep-LDFLAGS) $(config-LDFLAGS) \
 	  $(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
@@ -402,6 +407,18 @@ $(LINK.o) -shared -Wl,-O1 $(sysdep-LDFLAGS) $(config-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) -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))
 # binutils only position loadable notes into the first page for binaries,
@@ -419,18 +436,36 @@ $(build-shlib-helper) -o $@ -T $@.lds \
 rm -f $@.lds
 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 $(sysdep-LDFLAGS) $(config-LDFLAGS) \
 	  -B$(csu-objpfx) $(load-map-file) \
 	  $(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'.
@@ -450,12 +485,22 @@ $(build-module-helper) -o $@ -T $@.lds \
 rm -f $@.lds
 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),\
@@ -481,6 +526,7 @@ LDFLAGS-c.so += -u __register_frame
 # 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 -Wl,--whole-archive $^
@@ -500,6 +546,23 @@ $(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.