mailing list of musl libc
 help / color / mirror / code / Atom feed
* -m32
@ 2017-05-29 18:22 Jorge Almeida
  2017-05-29 20:08 ` -m32 Laurent Bercot
  0 siblings, 1 reply; 7+ messages in thread
From: Jorge Almeida @ 2017-05-29 18:22 UTC (permalink / raw)
  To: musl

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


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

end of thread, other threads:[~2017-05-30  8:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-29 18:22 -m32 Jorge Almeida
2017-05-29 20:08 ` -m32 Laurent Bercot
2017-05-29 21:07   ` -m32 Jorge Almeida
2017-05-29 21:23     ` -m32 Matias Fonzo
2017-05-29 22:41       ` -m32 Jorge Almeida
2017-05-30  0:17         ` -m32 Rich Felker
2017-05-30  8:26           ` -m32 Jorge Almeida

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).