[971016]: PICFLAG vs. multilib - solution
Manfred Hollstein
manfred@s-direktnet.de
Fri Feb 6 04:30:00 GMT 1998
On Fri, 6 February 1998, 01:37:14, law@cygnus.com wrote:
>
> In message <9710231238.AA29528@lts.sel.alcatel.de>you write:
> > ChangeLogs:
> >
> > toplevel dir:
> > Thu Oct 23 14:03:59 1997 Manfred Hollstein <manfred@s-direktnet.de>
> >
> > * Makefile.in (BASE_FLAGS_TO_PASS): Don't pass PICFLAG and
> > PICFLAG_FOR_TARGET.
> > (EXTRA_TARGET_FLAGS): Don't pass PICFLAG_FOR_TARGET.
> >
> > * configure: Emit a definition for the new macro enable_shared
> > into each Makefile.
> >
> > * config/mh-sparcpic (PICFLAG): Define to properly according
> > to current multilib configuration.
> > * config/mt-sparcpic (PICFLAG_FOR_TARGET): Define to properly
> > according to current multilib configuration.
> >
> > libiberty:
> > Thu Oct 23 14:09:09 1997 Manfred Hollstein <manfred@s-direktnet.de>
> >
> > * Makefile.in (FLAGS_TO_PASS): Don't pass PICFLAG.
> > (.c.o): Check value of enable_shared, not PICFLAG.
> > (stamp-picdir): Dito.
> >
> > libio:
> > Thu Oct 23 14:11:22 1997 Manfred Hollstein <manfred@s-direktnet.de>
> >
> > * config.shared (FLAGS_TO_PASS): Don't emit PICFLAG.
> > (.c.o): Check value of enable_shared, not PICFLAG.
> > (.C.o): Dito.
> > (.cc.o): Dito.
> > (stamp-picdir): Dito.
> >
> > libstdc++:
> > Thu Oct 23 14:14:06 1997 Manfred Hollstein <manfred@s-direktnet.de>
> >
> > * Makefile.in (piclist): Check value of enable_shared, not PICFLAG.
> > (stmp-string, ...): Dito.
> > (bigstmp-string, ...): Dito.
> Thanks. I've installed this patch.
> jeff
Great!
H.J., now we need at patch for libg++, too. My patch below should work even
with an unpatched libstdc++-2.8.0 which uses the old `if [ -z "$(PICFLAG)" ]...'
checks.
BTW, I just checked libg++-2.8.1-980201 on Solaris and everything works ok with
egcs (no surprise); but I'll have to check with gcc-2.8.0 as well ;-)
Manfred
libg++/ChangeLog:
Sun Jan 18 19:28:55 1998 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (install): Remove superfluous /g++-include in error message.
(picflag): Prefer checking enable_shared over PICFLAG to ensure
compatibility with unpatched libstdc++-2.8.0.
librx/ChangeLog:
Thu Jan 22 09:30:37 1998 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (.c.o): Check value of enable_shared, not PICFLAG.
(stamp-picdir): Likewise.
* configure: Re-build.
* configure (shared): AC_SUBST (shared).
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980205.orig/libg++/Makefile.in egcs-980205/libg++/Makefile.in
*** egcs-980205.orig/libg++/Makefile.in Sun Feb 1 23:42:30 1998
--- egcs-980205/libg++/Makefile.in Fri Feb 6 10:21:05 1998
*************** list: src/libgxx.list $(RX_OBJ)
*** 107,116 ****
piclist: list
-rm -f piclist
! if [ -z "$(PICFLAG)" ]; then \
! cp list piclist; \
! else \
sed 's,\([0-9A-Za-z_]*\.o\),pic/\1,g' list > piclist ; \
fi
$(ARLIB): list
--- 107,116 ----
piclist: list
-rm -f piclist
! if [ x"$(enable_shared)" = xyes ] || [ x"$(enable_shared)" = x -a x"$(PICFLAG)" != x ]; then \
sed 's,\([0-9A-Za-z_]*\.o\),pic/\1,g' list > piclist ; \
+ else \
+ cp list piclist; \
fi
$(ARLIB): list
*************** installcheck: check
*** 184,190 ****
.PHONY: install
install:
@if [ -f $(gxx_include_dir)/unistd.h ] ; then echo; \
! echo '*** You seem to have files in $(gxx_include_dir)/g++-include'; \
echo '*** left over from an old release of libg++. These must be removed.'; \
echo '*** Please see $(srcdir)/README for more information.'; \
echo; \
--- 184,190 ----
.PHONY: install
install:
@if [ -f $(gxx_include_dir)/unistd.h ] ; then echo; \
! echo '*** You seem to have files in $(gxx_include_dir)'; \
echo '*** left over from an old release of libg++. These must be removed.'; \
echo '*** Please see $(srcdir)/README for more information.'; \
echo; \
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980205.orig/librx/Makefile.in egcs-980205/librx/Makefile.in
*** egcs-980205.orig/librx/Makefile.in Sun Nov 24 10:17:05 1996
--- egcs-980205/librx/Makefile.in Fri Feb 6 10:21:05 1998
*************** AR = ar
*** 42,47 ****
--- 42,48 ----
AR_FLAGS = rc
RANLIB = @RANLIB@
PICFLAG =
+ enable_shared = @shared@
# @target_frag@
*************** libobjs=rx.o
*** 54,60 ****
COMPILE.c = $(CC) -c $(LIBCFLAGS) $(DEFS) -I$(srcdir)
.c.o:
! if [ -n "$(PICFLAG)" ]; then \
$(COMPILE.c) $(PICFLAG) $< -o pic/$@; \
else true; fi
$(COMPILE.c) $<
--- 55,61 ----
COMPILE.c = $(CC) -c $(LIBCFLAGS) $(DEFS) -I$(srcdir)
.c.o:
! if [ x"$(enable_shared)" = xyes ]; then \
$(COMPILE.c) $(PICFLAG) $< -o pic/$@; \
else true; fi
$(COMPILE.c) $<
*************** librx.a: $(libobjs)
*** 111,117 ****
rx.o: stamp-picdir rx.c rx.h
stamp-picdir:
! if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
--- 112,118 ----
rx.o: stamp-picdir rx.c rx.h
stamp-picdir:
! if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980205.orig/librx/configure.in egcs-980205/librx/configure.in
*** egcs-980205.orig/librx/configure.in Sun Nov 24 10:17:05 1996
--- egcs-980205/librx/configure.in Fri Feb 6 10:21:05 1998
*************** else
*** 55,60 ****
--- 55,61 ----
AC_MSG_RESULT(${target_frag})
fi
AC_SUBST_FILE(target_frag)
+ AC_SUBST(shared)
AC_OUTPUT(Makefile,
. ${librx_topdir}/config-ml.in,
*************** target=${target}
*** 63,66 ****
--- 64,68 ----
ac_configure_args="${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
librx_topdir=${librx_topdir}
+ shared=${shared}
)
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980205.orig/librx/configure egcs-980205/librx/configure
*** egcs-980205.orig/librx/configure Sun Nov 24 10:17:05 1996
--- egcs-980205/librx/configure Fri Feb 6 10:21:06 1998
*************** s%@build_vendor@%$build_vendor%g
*** 1465,1470 ****
--- 1465,1471 ----
s%@build_os@%$build_os%g
/@target_frag@/r $target_frag
s%@target_frag@%%g
+ s%@shared@%$shared%g
CEOF
EOF
*************** target=${target}
*** 1533,1538 ****
--- 1534,1540 ----
ac_configure_args="${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
librx_topdir=${librx_topdir}
+ shared=${shared}
EOF
cat >> $CONFIG_STATUS <<\EOF
More information about the Gcc-bugs
mailing list