public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Current egcs-mainline fails to build on FreeBSD 3.1
@ 1999-06-02 13:01 Gerald Pfeifer
  1999-06-30 23:07 ` [PATCH] " Marc Espie
  0 siblings, 1 reply; 9+ messages in thread
From: Gerald Pfeifer @ 1999-06-02 13:01 UTC (permalink / raw)
  To: egcs-bugs; +Cc: David O'Brien

...with the following abort, which remained after another
`egcs_update -PAd`.  

Is it possible that this has been caused by the following patch?

  Wed Jun  2 00:52:34 1999  David O'Brien <obrien@FreeBSD.org>

        * configure.in (i[34567]86-*-freebsdelf): Don't include linux.h,
        i386/freebsd-elf.h no longer requires it.  Instead include svr4.h.
        * configure: Rebuilt.
        * i386/freebsd-elf.h (DEFAULT_VTABLE_THUNKS): Define.
        (ASM_COMMENT_START, ASM_APP_ON, ASM_APP_OFF, SET_ASM_OP): Likewise.
        (PREFERRED_DEBUGGING_TYPE, WCHAR_UNSIGNED): Likewise.
        (SWITCH_TAKES_ARG): Likewise.
        * i386/freebsd.h: Remove FREEBSD_NATIVE support.
        * config/t-freebsd: Moved from config/i386/ so it can used for all
        FreeBSD targets.


---- cut here ----
  -DLOCALEDIR=\"/sw/test/egcs/FreeBSD/share/locale\" \
  -c `echo /sw/test/egcs/egcs/gcc/intl.c | sed 's,^\./,,'`
stage1/xgcc -Bstage1/ -B/sw/test/egcs/FreeBSD/i386-unknown-freebsdelf3.1/bin/  -DIN_GCC     -W -Wall -O2 -O  -DHAVE_CONFIG_H    -I. -I/sw/test/egcs/egcs/gcc -I/sw/test/egcs/egcs/gcc/config -I/sw/test/egcs/egcs/gcc/../include \
-DPREFIX=\"/sw/test/egcs/FreeBSD\" \
  -c `echo /sw/test/egcs/egcs/gcc/prefix.c | sed 's,^\./,,'`
In file included from tm.h:14,
                 from /sw/test/egcs/egcs/gcc/config/i386/xm-i386.h:43,
                 from config.h:8,
                 from /sw/test/egcs/egcs/gcc/prefix.c:66:
/sw/test/egcs/egcs/gcc/config/i386/freebsd-elf.h:187: warning: `SWITCH_TAKES_ARG' redefined
/sw/test/egcs/egcs/gcc/config/svr4.h:59: warning: this is the location of the previous definition
stage1/xgcc -Bstage1/ -B/sw/test/egcs/FreeBSD/i386-unknown-freebsdelf3.1/bin/ -c  -DIN_GCC     -W -Wall -O2 -O  -DHAVE_CONFIG_H    -I. -I/sw/test/egcs/egcs/gcc -I/sw/test/egcs/egcs/gcc/config -I/sw/test/egcs/egcs/gcc/../include /sw/test/egcs/egcs/gcc/version.c
stage1/xgcc -Bstage1/ -B/sw/test/egcs/FreeBSD/i386-unknown-freebsdelf3.1/bin/ -c  -DIN_GCC     -W -Wall -O2 -O  -DHAVE_CONFIG_H    -I. -I/sw/test/egcs/egcs/gcc -I/sw/test/egcs/egcs/gcc/config -I/sw/test/egcs/egcs/gcc/../include /sw/test/egcs/egcs/gcc/mbchar.c
rm -f obstack.c
ln -s /sw/test/egcs/egcs/gcc/../libiberty/obstack.c obstack.c
stage1/xgcc -Bstage1/ -B/sw/test/egcs/FreeBSD/i386-unknown-freebsdelf3.1/bin/ -c  -DIN_GCC     -W -Wall -O2 -O  -DHAVE_CONFIG_H    -I. -I/sw/test/egcs/egcs/gcc -I/sw/test/egcs/egcs/gcc/config -I/sw/test/egcs/egcs/gcc/../include obstack.c
In file included from tm.h:14,
                 from /sw/test/egcs/egcs/gcc/config/i386/xm-i386.h:43,
                 from config.h:8,
                 from obstack.c:24:
/sw/test/egcs/egcs/gcc/config/i386/freebsd-elf.h:187: warning: `SWITCH_TAKES_ARG' redefined
/sw/test/egcs/egcs/gcc/config/svr4.h:59: warning: this is the location of the previous definition
stage1/xgcc -Bstage1/ -B/sw/test/egcs/FreeBSD/i386-unknown-freebsdelf3.1/bin/  -DIN_GCC     -W -Wall -O2 -O  -DHAVE_CONFIG_H  -o cccp cccp.o cexp.o intl.o prefix.o version.o  mbchar.o  obstack.o        ../libiberty/libiberty.a
/usr/libexec/elf/ld: cannot open values-Xa.o: No such file or directory
collect2: ld returned 1 exit status
gmake[2]: *** [cccp] Error 1
gmake[2]: Leaving directory `/files/pfeifer/OBJ-0206-20:48/gcc'


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
  1999-06-30 23:07 ` [PATCH] " Marc Espie
@ 1999-06-03 14:25   ` Gerald Pfeifer
  1999-06-30 23:07     ` Jeffrey A Law
  1999-06-03 23:20   ` Jeffrey A Law
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Gerald Pfeifer @ 1999-06-03 14:25 UTC (permalink / raw)
  To: Marc Espie; +Cc: obrien, egcs-bugs, egcs-patches

On Thu, 3 Jun 1999, Marc Espie wrote:
> I don't know much about FreeBSD, but the following patch should be able
> to fix the trouble.  The SWITCH_TAKES_ARG is a no-brainer, and I've just
> copied the linux specs that used to be included `verbatim'.
> 
> Thu Jun  3 11:34:34 CEST 1999	Marc Espie <espie@cvs.openbsd.org>
> 	* freebsd-elf.h (SWITCH_TAKES_ARG):  Redefine, not define.
> 	(STARTFILE_SPEC):  Define, override the svr4.h version.
> 	(ENDFILE_SPEC):  Likewise.

Thanks, this indeed fixes the bootstrap failure on FreeBSD 3.1.

(What worries me, by the way, is that the original patch causing
this bootstrap failure apparently never was tested with a compiler
bootstrap. Unless it was misapplied, that is.)


In any case, thanks again Marc! Jeff, RTH,... is that patch okay?

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
  1999-06-30 23:07 ` [PATCH] " Marc Espie
  1999-06-03 14:25   ` Gerald Pfeifer
@ 1999-06-03 23:20   ` Jeffrey A Law
  1999-06-15  0:16   ` David O'Brien
  1999-06-30 23:07   ` Alexandre Oliva
  3 siblings, 0 replies; 9+ messages in thread
From: Jeffrey A Law @ 1999-06-03 23:20 UTC (permalink / raw)
  To: Marc Espie; +Cc: pfeifer, obrien, egcs-bugs, egcs-patches

  In message < 199906030938.LAA05288@quatramaran.ens.fr >you write:
  > In article <Pine.GSO.4.10.9906022147240.17033-100000@markab.dbai.tuwien.ac.
  > Thu Jun  3 11:34:34 CEST 1999	Marc Espie <espie@cvs.openbsd.org>
  > 	* freebsd-elf.h (SWITCH_TAKES_ARG):  Redefine, not define.
  > 	(STARTFILE_SPEC):  Define, override the svr4.h version.
  > 	(ENDFILE_SPEC):  Likewise.
Thanks.  Installed (branch and mainline sources).
jeff


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
  1999-06-30 23:07 ` [PATCH] " Marc Espie
  1999-06-03 14:25   ` Gerald Pfeifer
  1999-06-03 23:20   ` Jeffrey A Law
@ 1999-06-15  0:16   ` David O'Brien
  1999-06-30 23:07     ` Jeffrey A Law
  1999-06-30 23:07   ` Alexandre Oliva
  3 siblings, 1 reply; 9+ messages in thread
From: David O'Brien @ 1999-06-15  0:16 UTC (permalink / raw)
  To: Marc Espie, pfeifer, egcs-bugs; +Cc: egcs-patches

> I don't know much about FreeBSD, but the following patch should be able
> to fix the trouble.  The SWITCH_TAKES_ARG is a no-brainer, and I've just
> copied the linux specs that used to be included `verbatim'.

The problem is there is too much linux.h already in freebsd-elf.h.

I've tested all my patches with egcs-core-*-.tar.gz.  I'll have to check
where I goofed.  Possibly I blew it with what patches I sent in.  I'm
juggling several.  I am assuming that it fixing the problems in
freebsd-elf.h is suffiently tested by the core functionality.  Of course
this might not be the case.


> +/* Provide a STARTFILE_SPEC appropriate for FreeBSD.  Here we add
..snip..
> +     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \

WRONG.  FreeBSD has no gcrt*.o files.  If I made a mistake, fine.  Email
me and chastise my goof.  But please do not introduce more bogons that
now have to be removed.  Fixing freebsd-elf.h has become a very slow
process already.

-- 
-- David    (obrien@NUXI.com  -or-  obrien@FreeBSD.org)
>From obrien@NUXI.com Tue Jun 15 00:17:00 1999
From: "David O'Brien" <obrien@NUXI.com>
To: Alexandre Oliva <oliva@dcc.unicamp.br>, Marc Espie <espie@quatramaran.ens.fr>
Cc: pfeifer@dbai.tuwien.ac.at, egcs-bugs@egcs.cygnus.com, egcs-patches@egcs.cygnus.com
Subject: Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
Date: Tue, 15 Jun 1999 00:17:00 -0000
Message-id: <19990615001720.D49434@nuxi.com>
References: <199906030938.LAA05288@quatramaran.ens.fr> <oryahzeiw0.fsf@lua.lbi.dcc.unicamp.br> <oryahzeiw0.fsf@lua.lbi.dcc.unicamp.br>
X-SW-Source: 1999-06/msg00402.html
Content-length: 261

> > +#undef	STARTFILE_SPEC
> > +#define STARTFILE_SPEC \
..snip..
> 
> BTW, does it make any sense to link with -lgmon on FreeBSD 3.*?  A

No it does not.  This STARTFILE_SPEC patch is totally bogus.

-- 
-- David    (obrien@NUXI.com  -or-  obrien@FreeBSD.org)
>From obrien@NUXI.com Tue Jun 15 00:21:00 1999
From: "David O'Brien" <obrien@NUXI.com>
To: Alexandre Oliva <oliva@dcc.unicamp.br>
Cc: egcs-bugs@egcs.cygnus.com
Subject: Re: freebsd-elf bug
Date: Tue, 15 Jun 1999 00:21:00 -0000
Message-id: <19990615002103.F49434@nuxi.com>
References: <6821.928823454@upchuck.cygnus.com> <or4skiycun.fsf@lua.lbi.dcc.unicamp.br> <or4skiycun.fsf@lua.lbi.dcc.unicamp.br>
X-SW-Source: 1999-06/msg00403.html
Content-length: 344

> He also found a bug related with an mcount() invocation missing a
> `dot' or `underscore' or something like that.

Yes, it is missing a dot.  As soon as I think I can get a patch fixing
that accepted, I will sumbit it.  I am submitting patches in very small
steps, one at a time.
 
-- 
-- David    (obrien@NUXI.com  -or-  obrien@FreeBSD.org)
>From law@cygnus.com Tue Jun 15 00:21:00 1999
From: Jeffrey A Law <law@cygnus.com>
To: obrien@NUXI.com
Cc: Marc Espie <espie@quatramaran.ens.fr>, pfeifer@dbai.tuwien.ac.at, egcs-bugs@egcs.cygnus.com, egcs-patches@egcs.cygnus.com
Subject: Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1 
Date: Tue, 15 Jun 1999 00:21:00 -0000
Message-id: <1072.929430872@upchuck.cygnus.com>
References: <19990615001549.C49434@nuxi.com>
X-SW-Source: 1999-06/msg00404.html
Content-length: 791

  In message < 19990615001549.C49434@nuxi.com >you write:
  > > +/* Provide a STARTFILE_SPEC appropriate for FreeBSD.  Here we add
  > ..snip..
  > > +     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
  > 
  > WRONG.  FreeBSD has no gcrt*.o files.  If I made a mistake, fine.  Email
  > me and chastise my goof.  But please do not introduce more bogons that
  > now have to be removed.  Fixing freebsd-elf.h has become a very slow
  > process already.
He put it back the way it was before you broke things (which worked in the
general case, but obviously not profiling).  Given that we're trying to get
a release out and folks need to be able to test, Mark's patch was (IMHO) the
right thing to do.

If you don't want other folks breaking freebsd, then submit the right patch
next time :-)

jeff


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
  1999-06-03 14:25   ` Gerald Pfeifer
@ 1999-06-30 23:07     ` Jeffrey A Law
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffrey A Law @ 1999-06-30 23:07 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Marc Espie, obrien, egcs-bugs, egcs-patches

  In message < Pine.GSO.4.10.9906032315151.17951-100000@markab.dbai.tuwien.ac.at
>you write:
  > On Thu, 3 Jun 1999, Marc Espie wrote:
  > > I don't know much about FreeBSD, but the following patch should be able
  > > to fix the trouble.  The SWITCH_TAKES_ARG is a no-brainer, and I've just
  > > copied the linux specs that used to be included `verbatim'.
  > > 
  > > Thu Jun  3 11:34:34 CEST 1999	Marc Espie <espie@cvs.openbsd.org>
  > > 	* freebsd-elf.h (SWITCH_TAKES_ARG):  Redefine, not define.
  > > 	(STARTFILE_SPEC):  Define, override the svr4.h version.
  > > 	(ENDFILE_SPEC):  Likewise.
  > 
  > Thanks, this indeed fixes the bootstrap failure on FreeBSD 3.1.
  > 
  > (What worries me, by the way, is that the original patch causing
  > this bootstrap failure apparently never was tested with a compiler
  > bootstrap. Unless it was misapplied, that is.)
It is certainly a concern.  One of the things we rely on, particularly for
the ports that we don't work on often is that submitters actually verify
their patches work on the platform in question :-)

  > In any case, thanks again Marc! Jeff, RTH,... is that patch okay?
I'm going to try to deal with this today.  It's unfortunate that nobody is
sending in build/test results for freebsd.  Particularly the newer 3.x 
versions.  At least I haven't seen any fly by.

jeff



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
  1999-06-15  0:16   ` David O'Brien
@ 1999-06-30 23:07     ` Jeffrey A Law
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffrey A Law @ 1999-06-30 23:07 UTC (permalink / raw)
  To: obrien; +Cc: Marc Espie, pfeifer, egcs-bugs, egcs-patches

  In message < 19990615001549.C49434@nuxi.com >you write:
  > > +/* Provide a STARTFILE_SPEC appropriate for FreeBSD.  Here we add
  > ..snip..
  > > +     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
  > 
  > WRONG.  FreeBSD has no gcrt*.o files.  If I made a mistake, fine.  Email
  > me and chastise my goof.  But please do not introduce more bogons that
  > now have to be removed.  Fixing freebsd-elf.h has become a very slow
  > process already.
He put it back the way it was before you broke things (which worked in the
general case, but obviously not profiling).  Given that we're trying to get
a release out and folks need to be able to test, Mark's patch was (IMHO) the
right thing to do.

If you don't want other folks breaking freebsd, then submit the right patch
next time :-)

jeff


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
  1999-06-30 23:07   ` Alexandre Oliva
@ 1999-06-30 23:07     ` David O'Brien
  0 siblings, 0 replies; 9+ messages in thread
From: David O'Brien @ 1999-06-30 23:07 UTC (permalink / raw)
  To: Alexandre Oliva, Marc Espie; +Cc: pfeifer, egcs-bugs, egcs-patches

> > +#undef	STARTFILE_SPEC
> > +#define STARTFILE_SPEC \
..snip..
> 
> BTW, does it make any sense to link with -lgmon on FreeBSD 3.*?  A

No it does not.  This STARTFILE_SPEC patch is totally bogus.

-- 
-- David    (obrien@NUXI.com  -or-  obrien@FreeBSD.org)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
  1999-06-02 13:01 Current egcs-mainline fails to build on FreeBSD 3.1 Gerald Pfeifer
@ 1999-06-30 23:07 ` Marc Espie
  1999-06-03 14:25   ` Gerald Pfeifer
                     ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Marc Espie @ 1999-06-30 23:07 UTC (permalink / raw)
  To: pfeifer, obrien, egcs-bugs; +Cc: egcs-patches

In article < Pine.GSO.4.10.9906022147240.17033-100000@markab.dbai.tuwien.ac.at > you write:
>...with the following abort, which remained after another
>`egcs_update -PAd`.  
>
>Is it possible that this has been caused by the following patch?
>
>`SWITCH_TAKES_ARG' redefined

to undef

>/usr/libexec/elf/ld: cannot open values-Xa.o: No such file or directory

part of the svr4.h specs, which was previously overridden by linux.h

I don't know much about FreeBSD, but the following patch should be able
to fix the trouble.  The SWITCH_TAKES_ARG is a no-brainer, and I've just
copied the linux specs that used to be included `verbatim'.

Thu Jun  3 11:34:34 CEST 1999	Marc Espie <espie@cvs.openbsd.org>
	* freebsd-elf.h (SWITCH_TAKES_ARG):  Redefine, not define.
	(STARTFILE_SPEC):  Define, override the svr4.h version.
	(ENDFILE_SPEC):  Likewise.

--- freebsd-elf.h.orig	Thu Jun  3 11:26:09 1999
+++ freebsd-elf.h	Thu Jun  3 11:30:22 1999
@@ -180,11 +180,36 @@
    -z* options (for the linker) (comming from svr4).
    We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
 
+#undef SWITCH_TAKES_ARG
 #define SWITCH_TAKES_ARG(CHAR) \
   (DEFAULT_SWITCH_TAKES_ARG (CHAR) \
    || (CHAR) == 'h' \
    || (CHAR) == 'z' \
    || (CHAR) == 'R')
+
+/* Provide a STARTFILE_SPEC appropriate for FreeBSD.  Here we add
+   the magical crtbegin.o file (see crtstuff.c) which provides part 
+	of the support for getting C++ file-scope static object constructed 
+	before entering `main'. */
+   
+#undef	STARTFILE_SPEC
+#define STARTFILE_SPEC \
+  "%{!shared: \
+     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
+		       %{!p:%{profile:gcrt1.o%s} \
+			 %{!profile:crt1.o%s}}}} \
+   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+
+/* Provide a ENDFILE_SPEC appropriate for FreeBSD.  Here we tack on
+   the magical crtend.o file (see crtstuff.c) which provides part of 
+	the support for getting C++ file-scope static object constructed 
+	before entering `main', followed by a normal "finalizer" file, 
+	`crtn.o'.  */
+
+#undef	ENDFILE_SPEC
+#define ENDFILE_SPEC \
+  "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+
 
 #undef	LIB_SPEC
 #if 1



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
  1999-06-30 23:07 ` [PATCH] " Marc Espie
                     ` (2 preceding siblings ...)
  1999-06-15  0:16   ` David O'Brien
@ 1999-06-30 23:07   ` Alexandre Oliva
  1999-06-30 23:07     ` David O'Brien
  3 siblings, 1 reply; 9+ messages in thread
From: Alexandre Oliva @ 1999-06-30 23:07 UTC (permalink / raw)
  To: Marc Espie; +Cc: pfeifer, obrien, egcs-bugs, egcs-patches

On Jun  3, 1999, Marc Espie <espie@quatramaran.ens.fr> wrote:

> The SWITCH_TAKES_ARG is a no-brainer, and I've just copied the linux
> specs that used to be included `verbatim'.

> --- freebsd-elf.h.orig	Thu Jun  3 11:26:09 1999
> +++ freebsd-elf.h	Thu Jun  3 11:30:22 1999
> +#undef	STARTFILE_SPEC
> +#define STARTFILE_SPEC \
> +  "%{!shared: \
> +     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
> +		       %{!p:%{profile:gcrt1.o%s} \
> +			 %{!profile:crt1.o%s}}}} \
> +   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
 
>  #undef	LIB_SPEC
>  #if 1

BTW, does it make any sense to link with -lgmon on FreeBSD 3.*?  A
friend of mine has just complained that egcs 1.1.2 won't link when
given -pg, because -lgmon does not exist, and I couldn't help him
because I'm no profiling expert, and no FreeBSD expert at all :-)

Any ideas?

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1999-06-30 23:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-02 13:01 Current egcs-mainline fails to build on FreeBSD 3.1 Gerald Pfeifer
1999-06-30 23:07 ` [PATCH] " Marc Espie
1999-06-03 14:25   ` Gerald Pfeifer
1999-06-30 23:07     ` Jeffrey A Law
1999-06-03 23:20   ` Jeffrey A Law
1999-06-15  0:16   ` David O'Brien
1999-06-30 23:07     ` Jeffrey A Law
1999-06-30 23:07   ` Alexandre Oliva
1999-06-30 23:07     ` David O'Brien

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).