Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.uwa.edu.au!classic.iinet.com.au!swing.iinet.net.au!news.uoregon.edu!premier3.premier.net!news.jmls.edu!chi-news.cic.net!newsfeed.internetmci.com!news.sprintlink.net!in1.uu.net!polstra!not-for-mail From: jdp@polstra.com (John Polstra) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Q) gcc-2.7.0 Date: 16 Oct 1995 09:21:53 -0700 Organization: Polstra & Co., Seattle, WA Lines: 132 Message-ID: <45u0r1$a06@seattle.polstra.com> References: <KEN.95Oct14112138@tyd1.tydfam.iijnet.or.jp> NNTP-Posting-Host: seattle.polstra.com In article <KEN.95Oct14112138@tyd1.tydfam.iijnet.or.jp>, ken <ken@tyd1.tydfam.iijnet.or.jp> wrote: > Is there anyone successfully installed gcc-2.7.0 and libg++-2.7.0 > on FreeBSD-950928? > If there are any patches or walkaround for the problem I have below, > please let me know. > > Recently, I tried to install gcc-2.7.0 on FreeBSD-950928-SNAP. > Installation ended up fine with ./configure i386-unknown-freebsd2.1.0. > However, the compiler ddid not allow me to build libg++-2.7.0 > complainning that assembler does not know ".weak" at SLList.cc. > > I found ".weak" in gcc-2.7.0/config/i386/freebsd.h as follows; > > #define ASM_WEAKEN_LABEL(FILE,NAME) \ > do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ > fputc ('\n', FILE); } while (0) Here are some patches that will work around the problem. There are two sets of patches, one for gcc-2.7.0, and one for libg++-2.7.0.a. First, the gcc-2.7.0 patches: =============================================================================== *** config/i386/freebsd.h.orig Thu Aug 17 15:15:17 1995 --- config/i386/freebsd.h Fri Aug 18 09:48:57 1995 *************** *** 21,27 **** --- 21,29 ---- Boston, MA 02111-1307, USA. */ /* This goes away when the math-emulator is fixed */ + #ifndef TARGET_CPU_DEFAULT /* { */ #define TARGET_CPU_DEFAULT 0400 /* TARGET_NO_FANCY_MATH_387 */ + #endif /* } */ /* This is tested by i386gas.h. */ #define YES_UNDERSCORES *************** *** 122,130 **** --- 124,134 ---- /* This is how we tell the assembler that a symbol is weak. */ + #if 0 /* Doesn't work with the stock 2.0.5-RELEASE assembler { */ #define ASM_WEAKEN_LABEL(FILE,NAME) \ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ fputc ('\n', FILE); } while (0) + #endif /* } */ /* The following macro defines the format used to output the second operand of the .type assembler directive. Different svr4 assemblers *** Makefile.in.orig Thu Aug 17 15:14:39 1995 --- Makefile.in Fri Aug 18 16:49:36 1995 *************** *** 552,566 **** # Header files that are made available under the same name # to programs compiled with GCC. ! USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \ ! $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \ ! $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \ ! $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \ ! $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-pa.h \ ! $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \ ! $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \ ! $(srcdir)/ginclude/iso646.h \ ! $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) # The files that "belong" in CONFIG_H are deliberately omitted # because having them there would not be useful in actual practice. --- 552,558 ---- # Header files that are made available under the same name # to programs compiled with GCC. ! USER_H = $(EXTRA_HEADERS) # The files that "belong" in CONFIG_H are deliberately omitted # because having them there would not be useful in actual practice. =============================================================================== Next, the libg++-2.7.0a patches: =============================================================================== *** libio/gen-params.orig Fri Jun 16 14:07:45 1995 --- libio/gen-params Fri Aug 18 14:50:10 1995 *************** *** 273,288 **** if [ -s TMP ]; then # VALUE is now the typedef'd definition of $TYPE. eval "VALUE='`${SED} -e 's| *$||' -e '2,$d' <TMP`'" ! # Unless VALUE contains a blank, look for a typedef for it ! # in turn (this could be a loop, but that would be over-kill). ! if echo $VALUE | grep " " >/dev/null ; then true ! else ! rm -f TMP ! ${SED} -n -e "s|.*typedef[ ][ ]*\(.*[^a-zA-Z0-9_]\)${VALUE}[ ]*;.*|\1|w TMP" <dummy.out>/dev/null ! if [ -s TMP ]; then ! eval "VALUE='`${SED} -e '2,$d' -e 's|[ ]*$||' <TMP`'" fi ! fi eval "$TYPE='$VALUE'" fi fi --- 273,292 ---- if [ -s TMP ]; then # VALUE is now the typedef'd definition of $TYPE. eval "VALUE='`${SED} -e 's| *$||' -e '2,$d' <TMP`'" ! # Until VALUE contains a blank, look for a typedef for it ! # in turn. ! while true; do ! if echo $VALUE | grep " " >/dev/null ; then break ! else ! rm -f TMP ! ${SED} -n -e "s|.*typedef[ ][ ]*\(.*[^a-zA-Z0-9_]\)${VALUE}[ ]*;.*|\1|w TMP" <dummy.out>/dev/null ! if [ -s TMP ]; then ! eval "VALUE='`${SED} -e '2,$d' -e 's|[ ]*$||' <TMP`'" ! else ! break ! fi fi ! done eval "$TYPE='$VALUE'" fi fi =============================================================================== I used these successfully under 2.0.5. -- John Polstra jdp@polstra.com Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth