Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 504142

Summary: cross-i686-pc-linux-musl/musl - x86_64-pc-linux-gnu-gcc: crt/i386/crt1.s:7: Error: operand type mismatch for `pop'
Product: Gentoo Linux Reporter: David Heidelberg (okias) <david>
Component: [OLD] Core systemAssignee: Gentoo musl team <musl>
Status: RESOLVED OBSOLETE    
Severity: normal CC: gentoo, lu_zero, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: 0001-Do-not-use-deprecated-GNOME_.patch

Description David Heidelberg (okias) 2014-03-10 21:03:40 UTC
>>> Configuring source in /var/tmp/portage/cross-i686-pc-linux-musl/musl-9999/work/musl-9999 ...
checking for C compiler... x86_64-pc-linux-gnu-gcc
checking target system type... i686-pc-linux-musl
checking whether compiler accepts -std=c99... yes
checking whether compiler accepts -nostdinc... yes
checking whether compiler accepts -ffreestanding... yes
checking whether compiler accepts -fexcess-precision=standard... yes
checking whether compiler accepts -frounding-math... yes
checking whether compiler needs attribute((may_alias)) suppression... no
checking whether compiler accepts -fno-tree-loop-distribute-patterns... yes
checking for optimization settings... using provided CFLAGS
checking whether compiler accepts -pipe... yes
checking whether compiler accepts -fomit-frame-pointer... yes
checking whether compiler accepts -fno-unwind-tables... yes
checking whether compiler accepts -fno-asynchronous-unwind-tables... yes
checking whether compiler accepts -Wa,--noexecstack... yes
checking whether linker accepts -mtune=generic... yes
checking whether compiler accepts -Werror=implicit-function-declaration... yes
checking whether compiler accepts -Werror=implicit-int... yes
checking whether compiler accepts -Werror=pointer-sign... yes
checking whether compiler accepts -Werror=pointer-arith... yes
checking whether compiler accepts -fno-stack-protector... yes
checking whether linker accepts -Wl,--hash-style=both... yes
checking whether linker accepts -Wl,-Bsymbolic-functions... yes
checking whether linker accepts -lgcc... yes
checking whether linker accepts -lgcc_eh... yes
using compiler runtime libraries: -lgcc -lgcc_eh
checking whether compiler's long double definition matches float.h... yes
creating config.mak... done
>>> Source configured.
>>> Compiling source in /var/tmp/portage/cross-i686-pc-linux-musl/musl-9999/work/musl-9999 ...
make -j5 include/bits/alltypes.h 
ln -sf ../arch/i386/bits include/bits
sed -f tools/mkalltypes.sed include/bits/alltypes.h.in include/alltypes.h.in > include/bits/alltypes.h
make -j5 
x86_64-pc-linux-gnu-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/i386 -I./src/internal -I./include  -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector -O3 -fno-tree-vectorize -march=native -pipe -c -o crt/crt1.o crt/i386/crt1.s
x86_64-pc-linux-gnu-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/i386 -I./src/internal -I./include  -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector -O3 -fno-tree-vectorize -march=native -pipe -fPIC -c -o crt/Scrt1.o crt/i386/Scrt1.s
x86_64-pc-linux-gnu-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/i386 -I./src/internal -I./include  -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector -O3 -fno-tree-vectorize -march=native -pipe -c -o crt/crti.o crt/i386/crti.s
x86_64-pc-linux-gnu-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/i386 -I./src/internal -I./include  -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector -O3 -fno-tree-vectorize -march=native -pipe -c -o crt/crtn.o crt/i386/crtn.s
x86_64-pc-linux-gnu-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/i386 -I./src/internal -I./include  -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector -O3 -fno-tree-vectorize -march=native -pipe -c -o src/aio/aio_cancel.o src/aio/aio_cancel.c
crt/i386/crt1.s: Assembler messages:
crt/i386/crt1.s:7: Error: operand type mismatch for `pop'


Reproducible: Always

Steps to Reproduce:
1. crossdev -s4 --b 2.24-r2 --g 4.8.2 --k 3.13 --l 9999 -t i686-pc-linux-musl
2. wait for it
3.
Actual Results:  
It doesn't use i686-pc-linux-musl-gcc, so it fails when tries generate x86_64 code in i686 target

Expected Results:  
use i686-pc-linux-musl-gcc instead of native x86_64-pc-linux-gnu-gcc
Comment 1 David Heidelberg (okias) 2014-03-10 22:00:32 UTC
ugly hack

CC=i686-pc-linux-musl-gcc emerge -1av =cross-i686-pc-linux-musl/musl-9999::crossdev
Comment 2 Anthony Basile gentoo-dev 2014-03-11 17:42:44 UTC
(In reply to David Heidelberger (okias) from comment #1)
> ugly hack
> 
> CC=i686-pc-linux-musl-gcc emerge -1av
> =cross-i686-pc-linux-musl/musl-9999::crossdev

Try passing -m32 to the CFLAGS
Comment 3 David Heidelberg (okias) 2014-03-11 19:01:37 UTC
tried in /usr/i686../etc/portage/make.conf but didn't helped

(In reply to Anthony Basile from comment #2)
> (In reply to David Heidelberger (okias) from comment #1)
> > ugly hack
> > 
> > CC=i686-pc-linux-musl-gcc emerge -1av
> > =cross-i686-pc-linux-musl/musl-9999::crossdev
> 
> Try passing -m32 to the CFLAGS
Comment 4 SpanKY gentoo-dev 2014-03-13 00:37:39 UTC
cross-xxx/yyy packages do not look in /usr/xxx/ for settings
Comment 5 David Heidelberg (okias) 2014-03-15 00:50:02 UTC
Created attachment 372690 [details, diff]
0001-Do-not-use-deprecated-GNOME_.patch

Well, I'd like to drop all GNOME_ things, because they fail all. All marked as deprecated.

I created patch, based on yours, which drops all 4 lines of GNOME_
Comment 6 David Heidelberg (okias) 2014-03-15 00:50:35 UTC
Ignore that, damn, wrong bugreport :(
Comment 7 Wikky Kerr 2014-04-21 11:17:10 UTC
I can confirm passing CFLAGS="-m32" makes i686 musl build just fine on amd64.
Comment 8 Felix Janda 2014-11-07 21:39:03 UTC
Could you see if it is fixed with the new musl ebuilds?
Comment 9 David Heidelberg (okias) 2017-07-30 19:51:54 UTC
I guess it's not valid anymore..

In case someone hits it, please reopen.