Hi Bill,
On 16/05/2013 10:05 AM, David Holmes wrote:
Hi Bill,
(re-fixed the build-dev alias)
On 16/05/2013 6:48 AM, BILL PITTORE wrote:
Some architecture dependent flags do not make it through to the
libjsig.so and libsaproc.so makefiles. As a result, the libs are not
compiled/linked with the correct flags for that particular variant. Fix
is to make sure EXTRA_CFLAGS propogates down correctly.
http://cr.openjdk.java.net/~bpittore/8014669/webrev.00/
I need to look closer at this. Passing all of the EXTRA_CFLAGS as link
options seems wrong to me as they may not be valid linker options. That
said I see that in this case we are actually using the C compiler to do
the linking. But that said, in the saproc case we are also compiling C
source files at the same time which means that EXTRA_CFLAGS is needed on
the main command line, not tucked onto the LD flags. And the implication
here is that cross-compilation of libsaproc has been broken all this
time for any platform where the default gcc output would be wrong!
Given in both cases we use CC to compile and link I think the more
explicit solution here is to add EXTRA_CFLAGS as a primary argument to
the $(CC) invocation - see below.
Thanks,
David
diff -r 293b99787401 make/linux/makefiles/jsig.make
--- a/make/linux/makefiles/jsig.make
+++ b/make/linux/makefiles/jsig.make
@@ -54,7 +54,7 @@
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
- $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl
+ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS)
$(EXTRA_CFLAGS) -o $@ $< -ldl
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
diff -r 293b99787401 make/linux/makefiles/saproc.make
--- a/make/linux/makefiles/saproc.make
+++ b/make/linux/makefiles/saproc.make
@@ -92,6 +92,7 @@
$(SASRCFILES) \
$(SA_LFLAGS) \
$(SA_DEBUG_CFLAGS) \
+ $(EXTRA_CFLAGS) \
-o $@ \
-lthread_db
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)