Ok, so long title... I have switched out my Mingw Emacs for the Cygwin emacs-w32 but have run into some challenging path(?) issue.
I compile using i686-w64-mingw32-gcc (previously known as -mno-cygwin).
In a normal terminal I get:
$ i686-w64-mingw32-gcc exp.c -v
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-w64-mingw32/4.8.2/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: /cygdrive/i/szsz/tmpp/32gcc/mingw64-i686-gcc-4.8.2-1/src/gcc-4.8.2/configure --srcdir=/cygdrive/i/szsz/tmpp/32gcc/mingw64-i686-gcc-4.8.2-1/src/gcc-4.8.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/mingw64-i686-gcc --htmldir=/usr/share/doc/mingw64-i686-gcc/html -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-w64-mingw32 --without-libiconv-prefix --without-libintl-prefix --with-sysroot=/usr/i686-w64-mingw32/sys-root --with-build-sysroot=/usr/i686-w64-mingw32/sys-root --disable-multilib --disable-win32-registry --enable-languages=c,ada,c++,fortran,objc,obj-c++ --enable-fully-dynamic-string --enable-libgomp --enable-sjlj-exceptions --enable-version-specific-runtime-libs --with-dwarf2 --enable-decimal-float=bid --enable-lto
Thread model: win32
gcc version 4.8.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
/usr/libexec/gcc/i686-w64-mingw32/4.8.2/cc1.exe -quiet -v -U_REENTRANT exp.c -quiet -dumpbase exp.c -mtune=generic -march=pentiumpro -auxbase exp -version -o /tmp/cc6glCby.s
So that works. Note the path prepended to the cc1.exe. Which seems a reasonable place for it to be.
I have tried to set up emacs-w32 to have the same paths. Echoing the $PATH in the terminal and the output from M-x shell-command "echo $PATH" in emacs gives the same result. As far as I can tell it has a working path, all commands that I try, including 'ls', 'make' as well as some local ones, work as expected, even inside a Makefile. Except for the i686-w64-mingw-gcc, which does this:
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-gcc
Target: i686-w64-mingw32
Configured with: /cygdrive/i/szsz/tmpp/32gcc/mingw64-i686-gcc-4.8.2-1/src/gcc-4.8.2/configure --srcdir=/cygdrive/i/szsz/tmpp/32gcc/mingw64-i686-gcc-4.8.2-1/src/gcc-4.8.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/mingw64-i686-gcc --htmldir=/usr/share/doc/mingw64-i686-gcc/html -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-w64-mingw32 --without-libiconv-prefix --without-libintl-prefix --with-sysroot=/usr/i686-w64-mingw32/sys-root --with-build-sysroot=/usr/i686-w64-mingw32/sys-root --disable-multilib --disable-win32-registry --enable-languages=c,ada,c++,fortran,objc,obj-c++ --enable-fully-dynamic-string --enable-libgomp --enable-sjlj-exceptions --enable-version-specific-runtime-libs --with-dwarf2 --enable-decimal-float=bid --enable-lto
Thread model: win32
gcc version 4.8.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
cc1 -quiet -v -iprefix /bin/../lib/gcc/i686-w64-mingw32/4.8.2/ -U_REENTRANT exp.c -quiet -dumpbase exp.c -mtune=generic -march=pentiumpro -auxbase exp -version -o /cygdrive/c/Users/Thomas/AppData/Local/Temp/ccC472Qu.s
i686-w64-mingw32-gcc: error: spawn: No such file or directory
So the only difference is that this time the gcc-wrapper doesn't put a path before the cc1, presumably because it fails to find it in some path that it expects it to be.
But it also doesn't print any COLLECT_LTO_WRAPPER, whatever that means...
This happens inside a makefile and in a M-x shell-command. It does not happen in an interactive shell like M-x shell. So it smells like a interactive/non-interactive issue.
But since the paths are identical, I am at a loss. Anyone with any ideas?
Primary suspect at this point: COLLECT_LTO_WRAPPER, why doesn't the non-interactive version print that?
Related
I just installed mingw64 in my msys2 env on Win11. The compiler does not produce an object file when compiling a trivial file:
foo.c:
int i;
% /mingw64/bin/gcc -v -c foo.c
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev10, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Rev10, Built by MSYS2 project)
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=generic' '-march=nocona'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/cc1.exe -quiet -v -iprefix C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/ -D_REENTRANT foo.c -quiet -dumpbase foo.c -dumpbase-ext .c -mtune=generic -march=nocona -version -o C:\Users\me\AppData\Local\Temp\ccF8KQyo.s
% ls -l
-a--- 7 3 Feb 15:57 foo.c
%
As you can see it just outputs an assembly file into %TMP%. No errors or warnings (compiling without -v produces nothing on stdout/stderr).
I must have something misconfigured, but not sure what. I have reviewed previous SO answers but they are about source code with errors or warnings.
Turns out you need to have /mingw64/bin in $PATH or it fails silently in this way. Solved.
I am trying to execute "hello world" program in gitpod environment in 32bit by using "-m32" option. However, I cannot get a good result "hello world". I can only get "Bad system call".
Here is my test.c (hello world program)
#include<stdio.h>
int main() {
printf("hello world!\n");
return 0;
}
I only installed "gcc-multilib" to use "-m32" option
sudo apt-get install gcc-multilib
The below command is compile command.
gcc -m32 test.c
Then, I can get the result. (The process create core.* file e.g. core.2893)
gitpod /workspace/csapp-labs/test (main) $ gcc -m32 test.c
gitpod /workspace/csapp-labs/test (main) $ ./a.out
Bad system call (core dumped)
Here is my gcc environment.
gitpod /workspace/csapp-labs/test (main) $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
Some people said it can be caused by seccomp. However, I can't find something wrong on my system.conf file (/etc/systemd/system.conf)
...
#CapabilityBoundingSet=
#NoNewPrivileges=no
#SystemCallArchitectures=
#TimerSlackNSec=
#StatusUnitFormat=description
#DefaultTimerAccuracySec=1min
...
please see https://github.com/gitpod-io/gitpod/issues/7358
32bit is not supported as of now. You could utilize a qemu microvm for accomplishing what you want inside a Gitpod workspace.
I met strange issues about ELF32/ELF64 format in my building machine.
Both applications and kernle module don't work.
For applications (such as helloworld program), it can be built out to ELF64 but run failed.
For kernel modules it will always be built out to ELF32 format even if append -march=x86-64 to CFLGAS, which leads to Module has invalid ELF structures issue when insmoding.
If append -m64 and it will lead to cc1: error: CPU you selected does not support x86-64 instruction set
I guess when the first question fixed, the next will also be fixed, so I only post the first one here.
Ubunt 18.04, gcc 7.5.0 , x86_64 PC
GCC built out helloworld program to ELF64 binary but cannot run
gcc -o hello -v -c hello.c
...
chmod +x hello
./hello
-bash: ./hello: cannot execute binary file: Exec format error
uname -a
Linux AELAB146 5.4.0-74-generic #83~18.04.1-Ubuntu SMP Tue May 11 16:01:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
Kernel Module's Makefile
EXTRA_CFLAGS += -Wall (and others blablabla) -m64
KERNEL_BUILD ?= /lib/modules/$(shell uname -r)/build
pcie_objs := common/init.o common/pcie.o common/net.o platform.o
obj-m := pcie.o
pcie.o: $(pcie_objs)
ld -r $^ -o $#
all:
make -C $(KERNEL_BUILD) M=$(PWD) V=1 modules
I'v no idea about why it's so long for the gcc Configured options in my system.
You're not supposed to pass -c to GCC when building an executable. It means to compile and not link, but programs need to be linked to be ran. The fact that you had to do chmod +x hello should have been a clue that you were doing something very wrong. Run gcc -o hello -v hello.c and then ./hello.
I assume your issue with kernel modules is similarly caused by an incorrect command line, but since you didn't post the command line you used for it, I can't see where you went wrong with it.
I can not compile a simple c program without specifying '-march=native', I need to run it as: 'gcc -march=native -o hello hello.c'.
I did:
export CFLAGS='-march=native'
export CXXFLAGS='-march=native'
but didn't help.
user#server:~$ gcc -march=native -Q --help=target
...
-march=corei7-avx
...
Output of gcc -v:
user#server:~$ gcc -v
Using built-in specs.
gcc: error: missing argument to ‘-march=’
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
Where and how can I add this option to be default?
Two options:
Hard way. You may dump your specs file with gcc -dumpspecs > specs
command. Now put this file to /usr/lib/gcc/x86_64-linux-gnu/4.7/
folder and edit it to add option as described in documentation.
In your case I suggest to start from removing all
march=<something> lines, this might trivially help. But general case is troubles and creativity at this point.
Easy way: rename gcc binary to, say gcc-4.7 and make alias with
alias gcc='gcc-4.7 -march=native'
The source code is
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
The Object file is built without error
root#OpenWrt:/mnt/sda3# gccgo -v -c hello.go
Using built-in specs.
COLLECT_GCC=gccgo
Target: mipsel-openwrt-linux-gnu
Configured with: /home/michal/Data/openwrt/mt7621/mtk-openwrt-master-eglibc/build_dir/target-mipsel_1004kc+dsp_eglibc-2.19/gcc-4.9.2/configure --target=mipsel-openwrt-linux --host=mipsel-openwrt-linux --build=x86_64-linux-gnu --program-prefix= --program-suffix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --build=x86_64-linux-gnu --host=mipsel-openwrt-linux-gnu --target=mipsel-openwrt-linux-gnu --enable-languages=c,c++,go --with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt GCC 4.9.2' --enable-shared --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --disable-libmudflap --disable-multilib --disable-libgomp --disable-libquadmath --disable-libssp --disable-decimal-float --disable-libstdcxx-pch --with-host-libstdcxx=-lstdc++ --prefix=/usr --libexecdir=/usr/lib --with-float=soft
Thread model: posix
gcc version 4.9.2 (OpenWrt GCC 4.9.2)
COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'hello.o' '-shared-libgcc' '-msoft-float' '-mllsc' '-mno-shared'
/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/go1 hello.go -quiet -dumpbase hello.go -msoft-float -mllsc -mno-shared -auxbase-strip hello.o -version -L/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2 -L/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/../../.. -o /tmp/ccWiioSJ.s
GNU Go (OpenWrt GCC 4.9.2) version 4.9.2 (mipsel-openwrt-linux-gnu)
compiled by GNU C version 4.8.3, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31962
GNU Go (OpenWrt GCC 4.9.2) version 4.9.2 (mipsel-openwrt-linux-gnu)
compiled by GNU C version 4.8.3, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31962
COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'hello.o' '-shared-libgcc' '-msoft-float' '-mllsc' '-mno-shared'
as -v -EL -O1 -no-mdebug -mabi=32 -mno-shared -KPIC -o hello.o /tmp/ccWiioSJ.s
GNU assembler version 2.24 (mipsel-openwrt-linux-gnu) using BFD version (GNU Binutils) 2.24
COMPILER_PATH=/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'hello.o' '-shared-libgcc' '-msoft-float' '-mllsc' '-mno-shared'
But the linker reports an error undefined reference to `sync..import'.
root#OpenWrt:/mnt/sda2# gccgo -v -o hello hello.o
Using built-in specs.
COLLECT_GCC=gccgo
COLLECT_LTO_WRAPPER=/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/lto-wrapper
Target: mipsel-openwrt-linux-gnu
Configured with: /home/michal/Data/openwrt/mt7621/mtk-openwrt-master-eglibc/build_dir/target-mipsel_1004kc+dsp_eglibc-2.19/gcc-4.9.2/configure --target=mipsel-openwrt-linux --host=mipsel-openwrt-linux --build=x86_64-linux-gnu --program-prefix= --program-suffix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --build=x86_64-linux-gnu --host=mipsel-openwrt-linux-gnu --target=mipsel-openwrt-linux-gnu --enable-languages=c,c++,go --with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt GCC 4.9.2' --enable-shared --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --disable-libmudflap --disable-multilib --disable-libgomp --disable-libquadmath --disable-libssp --disable-decimal-float --disable-libstdcxx-pch --with-host-libstdcxx=-lstdc++ --prefix=/usr --libexecdir=/usr/lib --with-float=soft
Thread model: posix
gcc version 4.9.2 (OpenWrt GCC 4.9.2)
COMPILER_PATH=/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/:/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'hello' '-shared-libgcc' '-msoft-float' '-mllsc' '-mno-shared'
/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/collect2 --eh-frame-hdr -EL -dynamic-linker /lib/ld.so.1 -o hello /usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/crt1.o /usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/crti.o /usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/crtbegin.o -L/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2 -L/usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/../../.. hello.o -lgobegin -lgo -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/crtend.o /usr/lib/gcc/mipsel-openwrt-linux-gnu/4.9.2/crtn.o
hello.o: In function `__go_init_main':
hello.go:(.text+0x16c): undefined reference to `sync..import'
collect2: error: ld returned 1 exit status
What i missed? Thanks for help
I've tried static link the program, add a flag -static-libgo, it works.
Dynamic linking is iffy at best and not all that supported, so take it with a grain of salt.
That being said, it works for me, so something might be wrong with your gcc and/or libgo setup.
➜ gccgo -c hello.go
➜ gccgo -o hello hello.o
➜ ./hello
hello world
➜ ldd hello
linux-vdso.so.1 (0x00007fffb831f000)
libgo.so.5 => /usr/lib/libgo.so.5 (0x00007f214aaba000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f214a7b5000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f214a59f000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f214a1fc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f214b919000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f2149fdf000)
➜ gccgo -v
Using built-in specs.
COLLECT_GCC=gccgo
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-4.9-20150204/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 4.9.2 20150204 (prerelease) (GCC)
If you're trying to get a small executable size, look into using upx as a workaround or try to compile gccgo by hand.