Prev: Printing problem
Next: 64 bit question
From: goarilla on 5 Mar 2010 11:16 Sylvain Robitaille wrote: > Mikhail Zotov wrote: > >> There's a typo in the build script. > > This seems like a good time to suggest again that the target > architecture is likely best auto-detected at build time, at least in the > default cases, in Slackware's build scripts. Perhaps someone with some > influence on those scripts (Eric? Robby?) could propose it at a higher > level? In case it helps, in my own build scripts I use the following to > determine the architecture I'm building on: > > ARCH=${ARCH:-`uname -m`} > > Nice, simple, and portable. It's followed shortly after with: > > case "$ARCH" in > alpha) SLKCFLAGS="-O2 -m${MOPT}=ev4" > LIBDIRSUFFIX="64" > SLKLDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"; > ;; > i?86) SLKCFLAGS="-O2 -march=${ARCH} -m${MOPT}=${ARCH}" > SLKLDFLAGS=""; LIBDIRSUFFIX="" > ;; > s390) SLKCFLAGS="-O2" > SLKLDFLAGS=""; LIBDIRSUFFIX="" > ;; > powerpc) SLKCFLAGS="-O2" > SLKLDFLAGS=""; LIBDIRSUFFIX="" > ;; > x86_64) SLKCFLAGS="-O2 -fPIC" > LIBDIRSUFFIX="64" > SLKLDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"; > ;; > athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" > SLKLDFLAGS=""; LIBDIRSUFFIX="" > ;; > esac > > Which should look more or less familiar to those who have worked with > these scripts from multiple sources (I didn't make the above up, I > simply expanded it from other sources). This makes it *very* easy to > create Slackware packages for various architectures without risking > typos ... > out of curiousity why the explicit -fPIC compiler flag for the 64 bit x86 arch ?
From: Henrik Carlqvist on 5 Mar 2010 14:19 "goarilla(a)work" <kevindotpaulus(a)mtmdotkuleuven.be> wrote: > out of curiousity why the explicit -fPIC compiler flag for > the 64 bit x86 arch ? On x86_64 the flag -fPIC is needed when compiling object files that are included in a shared library. On 32 bit x86 that flag is not needed. For more information about what it does, see the man page for gcc. regards Henrik -- The address in the header is only to prevent spam. My real address is: hc3(at)poolhem.se Examples of addresses which go to spammers: root(a)localhost postmaster(a)localhost
From: Michael Black on 6 Mar 2010 15:53
On Thu, 4 Mar 2010, Juan MÂȘ Santiago Burruchaga wrote: > The packcage gnuplot-4.2.6-x86_64-1 is in the last ChangeLof for > Slackware-current 32 bits. > > And the March 6th changelog entry acknowledges this: xap/gnuplot-4.2.6-i486-1.txz: Rebuilt. This was compiled with the wrong $ARCH. Thanks again to Mikhail Zotov for spotting the problem. Michael |