Are my compiled binaries 'portable'?

Etna

New Member
Joined
Aug 27, 2019
Messages
1
Reaction score
0
Credits
0
Hi, please take a while to hear me out:

I am currently running some sort of a Linux From Scratch system layered over Debian 10, in which I mean Debian 10 forms the base operating system, but the kernel is my own and Mesa, libdrm and libglvnd, and most of the applications I use, with their dependencies are built from scratch in $HOME/Runtime. The goal is to isolate the base system from 'my stuff' in a way Windows and macOS does to a certain extent.

Naturally, i needed a very powerful computer to do this for all my applications: the hardware used is a Threadripper 2990wx with 128GB of memory.

I also have a 4 year old laptop that runs on Debian 10 as well; it's a Skylake i7-6500U with only 16GB of memory Now, I obviously do not have the time, patience or desire to recompile my entire so-called application environment on a laptop, so I simply copied $HOME/Runtime from my desktop over to my laptop's $HOME, making sure that i set up the laptop with the same username so that my applications don't complain. It worked.

I'm now getting two low-cost laptops from China powered by Gemini Lake (N4100) and Apollo Lake (Atom x7-E3950) processors to install Debian 10 on since the Skylake is starting to fall apart with broken shells and hinges. My concern here is whether gcc, g++ or clang used any instructions specific to Threadripper (like AVX, etc) when it built my kernel, drivers and applications, because I'm going to be mighty pissed if my copied $HOME/Runtime fails to run in Gemini Lake or Apollo Lake because of that.

I ran gcc -xc -v - and gcc -xc++ -v - and saw the following default flags:

Code:
-quiet -v -D_GNU_SOURCE - -quiet -dumpbase - -mtune=generic -march=x86-64 -auxbase

Similarly for my $HOME/Runtime/bin/clang -xc -v - and $HOME/Runtime/bin/clang -xc++ -v - , where i saw the following:
Code:
-target-cpu x86-64
default target x86_64-unknown-linux-gnu

I do not pass any additional CFLAGS or CXXFLAGS to my builds beyond -Wl to make the build link to my own libraries instead of Debian's, and -fPIC. Is this an assurance that my copied $HOME/Runtime will work on any x64 processor on Debian 10, as long as I make sure that they all have the same $HOME ?
 


G'day @Etna and welcome to linux.org :)

What you are working on is way beyond my paygrade and Getting Started is not your best spot to be.

If you click Forums and take a look through Dev-ops, Command Line and General Computing, you may find one of those is better for you and I can move this Thread there for you.

Be aware that despite our site name, we are not an official organ of Linux, but are staffed and assisted by volunteer Members with various skill sets and levels of expertise. I hope we can help.

Let us know., and good luck

Cheers

Chris Turner
wizardfromoz
 

Members online


Latest posts

Top