commandline option -PRINT TARGET

General FreeBASIC programming questions.
speedfixer
Posts: 326
Joined: Nov 28, 2012 1:27
Location: California

commandline option -PRINT TARGET

Postby speedfixer » May 24, 2019 6:04

The compiler is smart: that's good.

For Raspberry PI, when I do a fbc -print target I get 'linux-arm' as the reply on both my 3B+ and my zeroW.
Yes, both are linux-arm, but one is armv7l, the other is armv6l as answered by 'uname -m' command. I use this to steer/direct compiling to destination folders and to select proper libraries when compiling apps.

The code produced is different from one to the other.

armv6l (zeroW) can run on the arm7l (3B+), but not the other way around.


Could that target commandline be changed to properly reflect the target architecture?

Could that -print target commandline be changed to include the -arch info that the compiler would use? Perhaps even 32/64 for host, even?
I don't have a use for this at present, but someone might. This would be a quick way to identify the host when someone needs help with their programming.


david

In truth, I do not recall if I chose the excellent stw build arm6 or arm7 for the zeroW. The fbc -version reply is identical on each.
I assume that the host arch detection and target/arch selection by the compiler would correctly apply in either case.

Return to “General”

Who is online

Users browsing this forum: Exabot [Bot] and 3 guests