public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Building gcc 4.9.2 on AIX 7.1
@ 2023-06-11 12:26 Randy Galbraith
  2023-06-11 15:27 ` Tom Kacvinsky
  2023-06-11 18:31 ` Kai Ruottu
  0 siblings, 2 replies; 17+ messages in thread
From: Randy Galbraith @ 2023-06-11 12:26 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

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

OS version:

$ oslevel -s
7100-05-05-1939

Cheers, -Randy

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: Building gcc 4.9.2 on AIX 7.1
@ 2023-06-12 22:50 David Edelsohn
  2023-06-13 10:29 ` Randy Galbraith
  0 siblings, 1 reply; 17+ messages in thread
From: David Edelsohn @ 2023-06-12 22:50 UTC (permalink / raw)
  To: Randy Galbraith; +Cc: gcc-help

>>> Randy Galbraith wrote:

> We have a need to match gcc version on Red Hat GNU/Linux 7. I am looking
> forward to newer GCC once Red Hat is upgraded. However, that will likely
> break our build. We elevate every warning in gcc to error status that stops
> the building. Thus we need to plan for that. At the moment I just need to
> support the AIX 7.2 upgrade. Ironically had our port to GNU/Linux been
> completed this would not be an issue. Cheers, -Randy

Red Hat provides newer releases of GCC through the GCC Toolset
package, but that may be limited to RHEL 8.  RHEL 7 is quite old.

Does your AIX 7.2 system have all of the latest Technology Levels
(TLs) and Service Packs (SPs) installed? There have been many
assembler and linker fixes.

If you still have GCC 4.9.2 from the AIX 7.1 system, you should be
able to continue to use it.  You can rebuild the "fixed" headers
without rebuilding the entire compiler.  I don't believe that anyone
has tried bootstrapping GCC with XLC in a very long time.

GCC builds and works with AIX Assembler and AIX Linker.  Until
recently, GNU Assembler and GNU Linker were out of date on AIX 7.x and
produced corrupted object files. The latest GNU Binutils functions.
It might be better to ensure that the AIX tools are used (AIX as, ld,
ar).

GCC 4.9 is very old. I don't have any intuition about why GCC (without
any optimization) would generate unusual code for ferror().  Again, I
would ensure that you are not using the GNU Assembler for your
bootstrap.

Thanks, David

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

end of thread, other threads:[~2023-06-16 19:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-11 12:26 Building gcc 4.9.2 on AIX 7.1 Randy Galbraith
2023-06-11 15:27 ` Tom Kacvinsky
2023-06-11 16:27   ` Tom Kacvinsky
2023-06-11 19:04     ` Randy Galbraith
2023-06-11 21:04       ` Jonathan Wakely
2023-06-11 22:37         ` Randy Galbraith
2023-06-12 15:54           ` Randy Galbraith
2023-06-13  7:38             ` Christer Solskogen
2023-06-13 10:35               ` Randy Galbraith
2023-06-15 16:44                 ` Randy Galbraith
2023-06-15 22:05                   ` Jonathan Wakely
2023-06-16 19:46                     ` Randy Galbraith
2023-06-11 18:31 ` Kai Ruottu
2023-06-11 22:23   ` Randy Galbraith
2023-06-12 22:50 David Edelsohn
2023-06-13 10:29 ` Randy Galbraith
2023-06-13 10:42   ` Jonathan Wakely

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).