Mailinglist Archive: opensuse-amd64 (75 mails)
| < Previous | Next > |
Compiling 32bit binaries on AMD64
- From: Volker Kuhlmann <list0570@xxxxxxxxxxxxxxx>
- Date: Tue, 3 Jan 2006 17:38:32 +1300
- Message-id: <20060103043832.GB8177@xxxxxxxxxxxxxxx>
gcc -march=i586 -c -o workman_stubs.o workman_stubs.c
workman_stubs.c:1: error: CPU you selected does not support x86-64 instruction set
Flags come from RPM_OPTS_FLAGS, via --target=i586 or
--target=i586-suse-linux.
Googling indicates there is some 32bit gcc backend needed, but these are
installed:
cpp-4.0.2_20050901-3
gcc-32bit-4.0.2_20050901-3
gcc-4.0.2_20050901-3
glibc-32bit-2.3.5-40
glibc-devel-32bit-2.3.5-40
libgcc-4.0.2_20050901-3
Linux xx 2.6.13-15.7-default #1 Tue Nov 29 14:32:29 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux
The trick appears to be to use a -m32 as well. Has no-one noticed this
before, or am I doing something wrong? Essentially, rpmbuild
--target=i586 doesn't work without this patch:
--- /usr/lib/rpm/rpmrc.orig 2005-09-10 04:39:38.000000000 +1200
+++ /usr/lib/rpm/rpmrc 2006-01-03 17:02:30.000000000 +1300
@@ -13,8 +13,8 @@
optflags: i386 -O2 -g -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2
optflags: i486 -O2 -g -march=i486
-optflags: i586 -O2 -g -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
-optflags: i686 -O2 -g -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
+optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
+optflags: i686 -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
optflags: athlon -O2 -g -march=athlon
optflags: ia64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2
optflags: x86_64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2
Or should I be doing something else?
#141206
Thanks,
Volker
--
Volker Kuhlmann is possibly list0570 with the domain in header
http://volker.dnsalias.net/ Please do not CC list postings to me.
workman_stubs.c:1: error: CPU you selected does not support x86-64 instruction set
Flags come from RPM_OPTS_FLAGS, via --target=i586 or
--target=i586-suse-linux.
Googling indicates there is some 32bit gcc backend needed, but these are
installed:
cpp-4.0.2_20050901-3
gcc-32bit-4.0.2_20050901-3
gcc-4.0.2_20050901-3
glibc-32bit-2.3.5-40
glibc-devel-32bit-2.3.5-40
libgcc-4.0.2_20050901-3
Linux xx 2.6.13-15.7-default #1 Tue Nov 29 14:32:29 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux
The trick appears to be to use a -m32 as well. Has no-one noticed this
before, or am I doing something wrong? Essentially, rpmbuild
--target=i586 doesn't work without this patch:
--- /usr/lib/rpm/rpmrc.orig 2005-09-10 04:39:38.000000000 +1200
+++ /usr/lib/rpm/rpmrc 2006-01-03 17:02:30.000000000 +1300
@@ -13,8 +13,8 @@
optflags: i386 -O2 -g -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2
optflags: i486 -O2 -g -march=i486
-optflags: i586 -O2 -g -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
-optflags: i686 -O2 -g -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
+optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
+optflags: i686 -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
optflags: athlon -O2 -g -march=athlon
optflags: ia64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2
optflags: x86_64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2
Or should I be doing something else?
#141206
Thanks,
Volker
--
Volker Kuhlmann is possibly list0570 with the domain in header
http://volker.dnsalias.net/ Please do not CC list postings to me.
| < Previous | Next > |