Re: Building gcc 4.9.2 on AIX 7.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 11, 2023 at 2:31 PM Kai Ruottu <kai.ruottu@xxxxxxxxxxx> wrote:

> Randy Galbraith via Gcc-help kirjoitti 11.6.2023 klo 15.26:
> > Hello GCC community.
> >
> > I am looking for help building GCC 4.9.2 (also tried 4.9.4 and 5.4.0) on
> > IBM AIX Unix 7.1. Each attempt freezes during the run of build/genmddeps.
> > This appears to be related to two ld warnings:
> >
> > ld: 0711-768 WARNING: Object build/genmddeps.o, section 1, function
> .ferror:
> >              The branch at address 0x3cc is not followed by a recognized
> > no-op
> >              or TOC-reload instruction. The unrecognized instruction is
> > 0x7C691B78.
> >
> > ld: 0711-768 WARNING: Object build/genmddeps.o, section 1, function
> .ferror:
> >              The branch at address 0x3cc is not followed by a recognized
> > no-op
> >              or TOC-reload instruction. The unrecognized instruction is
> > 0x7C691B78.
> >
> > The compile/link of genmddeps was this:
> >
> > g++   -g -DIN_GCC    -fno-exceptions -fno-rtti
> -fasynchronous-unwind-tables
> > -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format
> > -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
> > -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -DGENERATOR_FILE
> > -static-libstdc++ -static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x40000000 -o
> > build/genmddeps \
> >      build/genmddeps.o build/read-md.o build/errors.o
> > ../../build-powerpc-ibm-aix7.1.0.0/libiberty/libiberty.a
> So you have the link command via the g++ compiler driver here...
> If you add the '-v' option into it you and others will see which linker
> was used.
> So please try this command in the build directory :
>
> g++ -v -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables \
> -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format \
> -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros \
> -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -DGENERATOR_FILE \
> -static-libstdc++ -static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x40000000 \
> -o build/genmddeps \
> build/genmddeps.o build/read-md.o build/errors.o \
> ../../build-powerpc-ibm-aix7.1.0.0/libiberty/libiberty.a
>
> Is the 'ld' one from the GNU binutils possible nowadays? Maybe it works...
>
> If the GNU binutils could be used then also cross-compiling things for
> IBM AIX Unix 7.1
> could be tried - others could try get the same $target compiler for
> their Linux etc hosts.
> These "gen*" things will be built for the $build system and be run in it
> to generate stuff
> to be compiled for the $host system. They may succeed on a cross host
> but not on the
> native IBM AIX host.
>
> But I remember also getting the "proprietary" standard C library for IBM
> AIX being a problem.
> It being copyrighted and not being available for others, only for those
> who own the IBM AIX
> target system.
>

Hi Kai. When I add -v to g++ I see it runs collect2. When I capture the
collect2 command and add -v to it, I can see it runs /usr/bin/ld. So IBM's
"ld" is being called. Thanks for that suggestion nonetheless since it
reveals lots of details. Cheers, -Randy




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux