https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120513

            Bug ID: 120513
           Summary: Possible arch or configure issue
           Product: gcc
           Version: 14.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: plugins
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chandleg at wizardsworks dot org
  Target Milestone: ---

Sorry about the length of this post, it's a whopper....
In 30 years have never seen this, and I'm not 100% sure where where to start to
look into it.....


I built a native compiler for alpha, from a cross compiler on x86_64, and to
test it out on the alpha I attempted to recompile the kernel natively.
As shown below, the native compiler claims all flags to be invalid, but
surprisingly checks their usage first (see the include -I example) before
complaining. I did remove every file associated with gcc from the system
(libraries, links, binaries, headers, etc (and even man pages)) and reinstalled
it again with identical results.

A test compile also hangs, as if waiting for input from stdin, and ctrl-d
yeilds some info, and drops a "<stdin>.s" file in the local dir:


root@bigbang:/usr/src/linux-6.12.31# zcat /proc/config.gz >.config
root@bigbang:/usr/src/linux-6.12.31# make oldconfig
  HOSTCC  scripts/basic/fixdep
gcc: error: unrecognized command-line option '-Wall'
gcc: error: unrecognized command-line option '-Wmissing-prototypes'
gcc: error: unrecognized command-line option '-Wstrict-prototypes'
gcc: error: unrecognized command-line option '-O2'; did you mean '-O'?
gcc: error: unrecognized command-line option '-fomit-frame-pointer'
gcc: error: unrecognized command-line option '-std=gnu11'
gcc: error: unrecognized command-line option '-I'
make[2]: *** [scripts/Makefile.host:116: scripts/basic/fixdep] Error 1
make[1]: *** [/usr/src/linux-6.12.31/Makefile:620: scripts_basic] Error 2
make: *** [Makefile:224: __sub-make] Error 2

So I tried:
root@bigbang:/usr/src/linux-6.12.31# gcc
gcc: fatal error: no input files
compilation terminated.

And that looked ok, then:
root@bigbang:/usr/src/linux-6.12.31# gcc -Wall
gcc: error: unrecognized command-line option '-Wall'
gcc: fatal error: no input files
compilation terminated.

Which again isn't right, so I tried the -I too:

root@bigbang:/usr/src/linux-6.12.31# gcc -I
gcc: error: missing path after '-I'
gcc: fatal error: no input files
compilation terminated.

root@bigbang:/usr/src/linux-6.12.31# gcc -I/usr/include
gcc: error: unrecognized command-line option '-I'
gcc: fatal error: no input files
compilation terminated.


Ok, then lets see what happened here:

root@bigbang:/usr/src/linux-6.12.31# gcc -v
Reading specs from /usr/lib/gcc/alpha-linux-gnu/14.2.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/alpha-linux-gnu/14.2.0/lto-wrapper
gcc: error: unrecognized command-line option '-v'
Target: alpha-linux-gnu
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --mandir=/usr/man
--infodir=/usr/info --enable-shared --enable-languages=c,c++
--enable-threads=posix --enable-checking=release --with-system-zlib
--enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new
--disable-libstdcxx-pch --disable-libunwind-exceu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (GCC)


It doesn't know what -v is, even though it accepted the flag for use and
rendered the output....

No environment variables set:
root@bigbang:/usr/src/linux-6.12.31# set |grep gcc
x=/usr/share/locale/fi/LC_MESSAGES/gcc.mo

No aliases:
root@bigbang:/usr/src/linux-6.12.31# alias
alias ls='/bin/ls $LS_OPTIONS'


Verified that it's not an alias using \gcc vs gcc:
root@bigbang:/usr/src/linux-6.12.31# \gcc -v
Reading specs from /usr/lib/gcc/alpha-linux-gnu/14.2.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/alpha-linux-gnu/14.2.0/lto-wrapper
gcc: error: unrecognized command-line option '-v'
Target: alpha-linux-gnu
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --mandir=/usr/man
--infodir=/usr/info --enable-shared --enable-languages=c,c++
--enable-threads=posix --enable-checking=release --with-system-zlib
--enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new
--disable-libstdcxx-pch --disable-libunwind-exceu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (GCC)



Everything looks right:
root@bigbang:/usr/src/linux-6.12.31# which gcc
/usr/bin/gcc

root@bigbang:/usr/src/linux-6.12.31# ls -al /usr/bin/gcc
lrwxrwxrwx 1 root root 10 Jun  2 22:13 /usr/bin/gcc -> gcc-14.2.0*

root@bigbang:/usr/src/linux-6.12.31# ls -al /usr/bin/gcc-14.2.0
-rwxr-xr-x 1 root root 3711128 Jun  2 20:37 /usr/bin/gcc-14.2.0*

root@bigbang:/usr/src/linux-6.12.31# file /usr/bin/gcc-14.2.0
/usr/bin/gcc-14.2.0: ELF 64-bit LSB executable, Alpha (unofficial), version 1
(GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, with
debug_info, not stripped

root@bigbang:/usr/src/linux-6.12.31# ldd /usr/bin/gcc-14.2.0
        libm.so.6.1 => /lib/libm.so.6.1 (0x0000020000060000)
        libc.so.6.1 => /lib/libc.so.6.1 (0x0000020000180000)
        /lib/ld-linux.so.2 => /usr/lib/ld-linux.so.2 (0x0000020000000000)

root@bigbang:/usr/src/linux-6.12.31# uname -a
Linux bigbang.wizardsworks.org 6.12.12 #4 Sat May 31 21:20:21 PDT 2025 alpha
EV6 Tsunami GNU/Linux


Tried this:
root@bigbang:/tmp# cat 1.c
#include <stdio.h>
#include <stdlib.h>

int main ()
  {
  }

root@bigbang:/tmp# gcc 1.c

And it hangs there like it's waiting on input from stdin....
ctrl-d yields:


Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> {heap 680k} <visibility> {heap 680k} <build_ssa_passes>
{heap 680k} <opt_local_passes> {heap 680k} <remove_symbols> {heap 680k}
<targetclone> {heap 680k} <free-fnsummary> {heap 680k}Streaming LTO
 <whole-program> {heap 680k} <fnsummary> {heap 680k} <inline> {heap 680k}
<modref> {heap 680k} <free-fnsummary> {heap 680k} <single-use> {heap 680k}
<comdats> {heap 680k}Assembling functions:

Time variable                                   usr           sys          wall
          GGC
 phase setup                        :   0.03 ( 81%)   0.01 ( 64%)   0.05 ( 76%)
 1255k ( 92%)
 phase parsing                      :   0.01 ( 16%)   0.00 (  7%)   0.01 ( 13%)
  110k (  8%)
 parser (global)                    :   0.01 ( 19%)   0.00 (  7%)   0.01 ( 14%)
  101k (  7%)
 TOTAL                              :   0.04          0.01          0.07       
 1368k
gcc: fatal error: cannot execute '-plugin': posix_spawnp: No such file or
directory
compilation terminated.

root@bigbang:/tmp# cat \<stdin\>.s 
        .set noreorder
        .set volatile
        .set noat
        .set nomacro
        .arch ev4
        .text
        .ident  "GCC: (GNU) 14.2.0"
        .section        .note.GNU-stack,"",@progbits


Plugin support was specifically disabled in the build, so I'm not sure if this
is a bug with that, or something else.....

Here was the configure option to build it with the cross:
export CC=alpha-linux-gnu-gcc
export CROSS=alpha-linux-gnu-
  CFLAGS="-O2" \
  CXXFLAGS="-O2" \
  ../configure --prefix=/usr \
     --libdir=/usr/lib \
     --mandir=/usr/man \
     --infodir=/usr/info \
     --enable-shared \
     --enable-languages=c,c++ \
     --enable-threads=posix \
     --enable-checking=release \
     --with-system-zlib \
     --enable-libstdcxx-dual-abi \
     --with-default-libstdcxx-abi=new \
     --disable-libstdcxx-pch \
     --disable-libunwind-exceptions \
     --enable-__cxa_atexit \
     --enable-gnu-indirect-function \
     --enable-gnu-unique-object \
     --disable-plugin \
     --enable-lto \
     --disable-install-libiberty \
     --disable-werror \
     --with-gnu-ld \
     --with-isl \
     --verbose \
     --with-arch-directory=alpha \
     --disable-gtktest \
     --enable-clocale=gnu \
     --disable-multilib \
     --target=alpha-linux-gnu \
     --disable-nls \
     --disable-libatomic \
     --disable-libgomp \
     --disable-libquadmath \
     --disable-libsanitizer \
     --disable-libssp \
     --disable-libvtv \
     --build=x86_64-slackware-linux \
     --host=alpha-linux-gnu

The only thing I have to go on at this point is the error:
gcc: fatal error: cannot execute '-plugin': posix_spawnp: No such file or
directory

Plugins were disabled at compile time, so I don't know if this is a configure
issue, an alpha code not being up to date issue, or something else....

Reply via email to