Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

gcc architecture question

9 like 0 dislike
Hi,

I'm compiling my program with architecture set to

-mtune=i386
However, I'm also linking statically against several libs (libpng, zlib, jpeglib, vorbisfile, libogg). I've built these libs on my own using configure and make, so I guess these libs were built with architecture being set to my system's architecture which would be i686. But I don't want that! I want my program to run on i386, too, so I need to make sure that all these libs that I'm statically linking against are built for i386, too.

So my question: Is there a convenient way to build libpng/zlib/jpeglib/vorbisfile/libogg etc. for i386 or do I have to modify all of their makefiles manually and make sure that -mtune is set to i386?

Thanks for help!

Andy
asked 2 years ago by DBA-boss (120,990 points)

1 Answer

0 like 0 dislike
I  think

CFLAGS="-march=i386 -O3" make ...

Might work if they use autotools to generate the Makefile. You could also extract the files from an RPM if they have the .a and headers for the version you want. Or go for an SRPM and modify the spec/scripts to build for the arch:

RPM_ARCH="i386"
But it really isn't that much trouble to rebuild the libraries properly, to ensure you don't miss anything. it isn't like you are compiling a whole distro.
answered 2 years ago by eagles11 (179,830 points)

Related questions

10 like 0 dislike
1 answer
10 like 0 dislike
0 answers
4 like 0 dislike
1 answer
8 like 0 dislike
1 answer
asked 1 year ago by tulip (12,960 points)
7 like 0 dislike
1 answer