This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Problems with last BP patches for Makerules
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: Problems with last BP patches for Makerules
- From: Greg McGary <greg at kayak dot mcgary dot org>
- Date: 21 Jun 2000 03:57:38 -0700
- Cc: drepper at cygnus dot com
- Cc: libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>
- Cc: libc-hacker at sourceware dot cygnus dot com
- References: <u8vgz31jlp.fsf@gromit.rhein-neckar.de>
Andreas Jaeger <aj@suse.de> writes:
> your latest patch breaks compilation of a static only glibc:
Sorry about that. My checkin exposed what looks like a bug in
Makerules: all of the elide-routines.o* macros are defined inside
`ifeq (yes,$(build-shared))', so that a static-only build never gets a
definition for elide-routines.oS (or any of the others).
Question: do the contents of the static library differ
when we're also building a shared library? If the static library
contents are invariant, then the patch below is proper. If the static
library content depends on whether or not there's a shared library
configured, then the patch is wrong and needs some more work. In any
case, the content of the profiled, debug, and bounded libraries ought
not be influenced by the presence of the shared library.
This patch moves all of the elide-routines.o* definitions
outside the conditional:
2000-06-21 Greg McGary <greg@mcgary.org>
* Makerules (elide-routines.*, elide-bp-thunks):
Define unconditionally.
Index: Makerules
===================================================================
RCS file: /cvs/glibc/libc/Makerules,v
retrieving revision 1.338
diff -u -p -r1.338 Makerules
--- Makerules 2000/06/21 02:31:29 1.338
+++ Makerules 2000/06/21 10:37:41
@@ -369,6 +369,30 @@ define sed-remove-objpfx
endef
endif
+# Modify the list of routines we build for different targets
+
+ifeq (yes,$(build-shared))
+ifndef libc.so-version
+# Undefine this because it can't work when we libc.so is unversioned.
+static-only-routines =
+endif
+endif
+
+# Bounded pointer thunks are only built for *.ob
+elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
+
+elide-routines.oS += $(filter-out $(static-only-routines),\
+ $(routines) $(aux) $(sysdep_routines)) \
+ $(elide-bp-thunks)
+elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
+
+# If we have versioned code we don't need the old versions in any of the
+# static libraries.
+elide-routines.o += $(shared-only-routines) $(elide-bp-thunks)
+elide-routines.op += $(shared-only-routines) $(elide-bp-thunks)
+elide-routines.og += $(shared-only-routines) $(elide-bp-thunks)
+elide-routines.ob += $(shared-only-routines)
+
# Shared library building.
ifeq (yes,$(build-shared))
@@ -412,26 +436,6 @@ $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS
$(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
$(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so)
endef
-
-ifndef libc.so-version
-# Undefine this because it can't work when we libc.so is unversioned.
-static-only-routines =
-endif
-
-# Bounded pointer thunks are only built for *.ob
-elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
-
-elide-routines.oS += $(filter-out $(static-only-routines),\
- $(routines) $(aux) $(sysdep_routines)) \
- $(elide-bp-thunks)
-elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
-
-# If we have versioned code we don't need the old versions in any of the
-# static libraries.
-elide-routines.o += $(shared-only-routines) $(elide-bp-thunks)
-elide-routines.op += $(shared-only-routines) $(elide-bp-thunks)
-elide-routines.og += $(shared-only-routines) $(elide-bp-thunks)
-elide-routines.ob += $(shared-only-routines)
# Don't try to use -lc when making libc.so itself.
# Also omits crti.o and crtn.o, which we do not want