Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 29 May 2017 19:22:54 +0100
From: Jorge Almeida <jjalmeida@...il.com>
To: musl@...ts.openwall.com
Subject: -m32

I tried to compile a "hello world" program (on a x86_64 system) with
the -m32 flag of gcc:


/opt/bin/musl-gcc -static -march=native -Os -m32 -fomit-frame-pointer
-pipe -Wall  -Werror=pedantic  -Werror=implicit-function-declaration
-Wno-unused-function -pedantic -pedantic-errors
-mpreferred-stack-boundary=4 -falign-functions=1 -falign-jumps=1
-falign-loops=1 -fno-unwind-tables -fdata-sections -ffunction-sections
-Wl,--gc-sections -fno-asynchronous-unwind-tables -std=c99 -o foo
.foo.c
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
i386 architecture of input file
`/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/32/crtbegin.o' is incompatible
with i386:x86-64 output
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
i386 architecture of input file `/tmp/cc9x8D3p.o' is incompatible with
i386:x86-64 output
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
i386 architecture of input file
`/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/32/crtend.o' is incompatible
with i386:x86-64 output
collect2: error: ld returned 1 exit status
make: *** [.makefile_foo:15: foo] Error 1


Is there anything missing with my gcc, or is -m32 just not supported?

(I checked that the same program compiles and works correctly with glibc)

thanks

Jorge Almeida

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.