LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-19-2023, 11:45 AM   #1
colinh2
Member
 
Registered: Dec 2015
Posts: 54

Rep: Reputation: Disabled
Where should I install ARM's GNU toolchain (binutils/gcc/gdb) for aarch64 (on x86_64 Slackware)?


To be clear this is for cross-development (ie. Aarch64 bare-metal target on an x86_64 host).

I've downloaded the latest toolchain from ARM.

Extracting from the .tar.xz file results in bin, include, lib, libexec and share directories.

The files/directories in bin, include, lib/gcc and libexec have nice unique names and so fit in Slackware's /usr/bin, /usr/include, /usr/lib64 and /usr/libexec.

Code:
  cp -r bin/ /usr/
  cp -r include/ /usr/
  cp -r libexec/ /usr/
  cp -r lib/gcc /usr/lib64
But what should I do about

Code:
lib/bfd-plugins

and

share/
  doc/
  gcc-12.2.1/
  gdb/
  info/
  man/
The files in these directories share names with pre-existing ones for the normal x86_64 GNU toolchain.

Should I just put the whole lot in /usr/local?

Last edited by colinh2; 04-19-2023 at 01:44 PM. Reason: typo
 
Old 04-19-2023, 12:21 PM   #2
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 995

Rep: Reputation: 675Reputation: 675Reputation: 675Reputation: 675Reputation: 675Reputation: 675
You could put the files below /usr/local or you could place the files in some directory below /opt.

Instead of simply copying directory structures, you could also create a directory structure below a temporary directory and then from that temporary directory create a Slackware package with makepkg. Then you can install and later easily remove or upgrade your own custom Slackware package.

Another option to get a working ARM toolchain is to use the Slackware sources for the llvm package, modify the build script to add the targets that you want to the line:

Code:
-DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \
...or simply remove that line to instead as default, build all supported cross compilers including ARM.

After running that script (as root) you have your own custom llvm package with support for cross compiling which you can use to replace the original llvm package.

regards Henrik
 
Old 04-19-2023, 12:54 PM   #3
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 795

Rep: Reputation: 253Reputation: 253Reputation: 253
Stuff like this I usually put in /opt/. That's safe and makes sense. In the future, maybe that install will have a file that conflicts with your system files.
 
Old 04-19-2023, 01:42 PM   #4
colinh2
Member
 
Registered: Dec 2015
Posts: 54

Original Poster
Rep: Reputation: Disabled
Thanks all!

I've put everything in /usr/local.

That way all the new bin, include, lib etc. things are already findable via $PATH etc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] For Testing: Slackware ARM installation media for ARM and Aarch64 mralk3 Slackware - ARM 12 10-05-2021 08:07 AM
ipm timed out error on Red Hat 2.6.9-67.0.22.ELsmp #1 SMP x86_64 x86_64 x86_64 GNU/L bellnarm Linux - Newbie 0 07-07-2009 04:36 PM
GNU ToolChain for ARM, Linux 2.6.14-2/binutil-2.16/gcc 4.0.2/glibc-2.3.5 kumar_bst Linux - Software 0 01-22-2008 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration