LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   generating slackbuild pgks in $ARCH=x86_64 for an x86 pc (https://www.linuxquestions.org/questions/slackware-14/generating-slackbuild-pgks-in-%24arch%3Dx86_64-for-an-x86-pc-4175463778/)

nass 05-28-2013 11:11 AM

generating slackbuild pgks in $ARCH=x86_64 for an x86 pc
 
Hello everyone,
I want to generate some slackbuilds (things I can't find in slackbuilds.org), related with audio mostly.

I also would prefer to carry out the slackbuild scripts generation and the building of packages in a x86_64 pc. The slackbuilds are universal of course, but I need to the precompiled binary packages on a x86 pc.

What do you propose as a best way to go about it?

The safe way is to create a vm and do everything there.
could (and should) I just define on the x86_64,
Quote:

ARCH=x86
and let the script run resolving $ARCH like this?
some other way?

willysr 05-28-2013 01:53 PM

the script will be able to determine your architecture, so no need to define it explicitly (even though it also works)

nass 05-29-2013 04:48 AM

but like I said, I want to prepare packages for another arch...

TobiSGD 05-29-2013 06:42 AM

I usually compile packages for my 32 bit systems in a clean chroot of Slackware 32 bit on a machine running 64 bit Slackware with
Code:

ARCH=i486

chess 05-29-2013 08:24 AM

Quote:

Originally Posted by TobiSGD (Post 4961269)
I usually compile packages for my 32 bit systems in a clean chroot of Slackware 32 bit on a machine running 64 bit Slackware with
Code:

ARCH=i486

This is what I do as well. I actually export this setting in .profile (IIRC) so when I chroot into the 32 bit system the ARCH is set for me.

TobiSGD 05-29-2013 08:34 AM

Quote:

Originally Posted by chess (Post 4961329)
This is what I do as well. I actually export this setting in .profile (IIRC) so when I chroot into the 32 bit system the ARCH is set for me.

I have it in my .zshrc, but of course that works the same.

torimus 05-29-2013 04:21 PM

You would need a cross compiler to build for other architectures. As far as I know Slackware distributes gcc without multitarget support. Just try gcc -dumpmachine to see available platforms.

You either need to rebuild gcc & binutils to enable cross-compiling or do a separate install of the target platform - in virtual machine or directly if natively supported by your hardware.
Alien's gcc may also be used for x86 / x86_64 crosscompiling but I didn't personally tested. Maybe someone else may confirm/disprove it.


All times are GMT -5. The time now is 02:48 PM.