[cfarm-users] Boostrapping gcc on gcc303

Jonathan Wakely jwakely.gcc at gmail.com
Sat Oct 17 20:11:05 CEST 2020


On Sat, 17 Oct 2020 at 13:40, tkoenig--- via cfarm-users
<cfarm-users at lists.tetaneutral.net> wrote:
>
> [re-sending to the list, the first one was bounced]
>
> Am 17.10.20 um 14:31 schrieb Jonathan Wakely:
>  >
>  >
>  > On Sat, 17 Oct 2020, 13:00 tkoenig--- via cfarm-users,
> <cfarm-users at lists.tetaneutral.net
> <mailto:cfarm-users at lists.tetaneutral.net>> wrote:
>  >
>  >     Hi,
>  >
>  >     I am currently despairing of being able to bootstrap gcc on gc303
>  >     (a FreeBSD machine).
>  >
>  >     The installed gcc does not work because it is too old.
>  >
>  >     Using clang instead, I found that that binutils is too old for gcc
>  >     bootstrap.Thomas König <tk at tkoenig.net>
>  >
>  >
>  >
>  > What's the error? I don't think GCC requires a recent binutils, it
> should build with reduced functionality when an old binutils is present.
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97304
>
>  >
>  >     My request to cfarm-admins to install a recent binutils went
>  >     unanswered (or maybe didn't get through).
>  >
>  >     Trying to build a recent binutils first failed with the problem
>  >     that *.xz is not supported on FreeBSD.
>  >
>  >
>  > Why can't you download a .gz or .bz2 file instead?
>
> Because it's not on https://ftp.gnu.org/gnu/binutils/ for
> the newer versions?

Nonsense:
https://ftp.gnu.org/gnu/binutils/binutils-2.35.1.tar.gz
https://ftp.gnu.org/gnu/binutils/binutils-2.35.1.tar.bz2

>
> Anyway, I solved that problem.
>
>  >     creating bfdver.h
>  >     /usr/bin/sed -e s/NN/32/g <  > elf32-target.h
>  >     /bin/sh: Syntax error: redirection unexpected (expecting word)
>  >     *** Error code 2
>  >
>  >
>  > This looks like some shell variable after < failed to get set and so
> expands to nothing. Because that syntax isn't valid on Linux either.
>
> Result: I can't build binutils.

Yes, but you could try looking at the script and seeing what is not
being expanded, and find out why.

I just did that, and it's because the Makefile uses GNU make syntax,
and the default Make on FreBSD is classic UNIX Make. Use gmake
instead.

I've just successfully built binutils-2.35.1.tar.bz2 (downloaded from
the GNU FTP site that you claim doesn't have it) on gcc303. All you
need to do is run gmake instead of make (or alias make=gmake).

Are you sure that's not also the problem you had trying to build GCC?
GCC requires GNU Make, so be sure to use gmake to build gcc.


>  >
>  >     Anything else I can try?
>  >
>  >     I'd really like try to try out a development branch on a non-Linux
>  >     platform myself, but it seems not to be working.  Are there maybe
>  >     other options?
>  >
>  >
>  >
>  >
>  > Check if there's a newer GCC and/or binutils installed in the ports
> collection,
>
> How do I access that? I do not have admin priviliges on that box.

I meant already installed, i.e. in /usr/local

It looks like it isn't there.

>  > or in /opt/cfarm
>
> $ ls /opt
> ls: /opt: No such file or directory
>
>  > Otherwise you could use the installed system GCC to build GCC 4.8.5,
> then use that to build trunk. But it shouldn't be needed, using clang
> and the system binutils should work.
>
> Well, it doesn't.


More information about the cfarm-users mailing list