triplet or what ?
-
Hope can post this question on this forum. I was under believe that triplet means three in format: CPU-company-OS So why is config.guess adding -gnu as fourth value? I do not see any tangible benefits in reporting "gnu".
$ sudo bash config.guess
x86_64-pc-linux-gnuCheers
-
Hope can post this question on this forum. I was under believe that triplet means three in format: CPU-company-OS So why is config.guess adding -gnu as fourth value? I do not see any tangible benefits in reporting "gnu".
$ sudo bash config.guess
x86_64-pc-linux-gnuCheers
to a certain extent its the GNU foundation being picky. the systtem is "linux-gnu" i.e. a linux kernel with GNU infrastructure tools. AFAIK there's no other tools running on a linux system, but that doesn't mean there couldn't be. why are you using sudo in this situation? it shouldn't be neccessary
-
to a certain extent its the GNU foundation being picky. the systtem is "linux-gnu" i.e. a linux kernel with GNU infrastructure tools. AFAIK there's no other tools running on a linux system, but that doesn't mean there couldn't be. why are you using sudo in this situation? it shouldn't be neccessary
-
Hope can post this question on this forum. I was under believe that triplet means three in format: CPU-company-OS So why is config.guess adding -gnu as fourth value? I do not see any tangible benefits in reporting "gnu".
$ sudo bash config.guess
x86_64-pc-linux-gnuCheers
Hi, At first glance I thought it had something to do with the old [GNU/Linux naming controversy](https://en.wikipedia.org/wiki/GNU/Linux\_naming\_controversy) as @k5054 is implying. But I think the last field is actually the [C library used by the operating system](https://wiki.osdev.org/C\_Library). I just checked on some of my Qualcomm ARM devices and the fourth field is uClibc. Best Wishes, -David Delaune
-
Using sudo because it works. Now I may have to modify the code to look for "linux-gnu", See no issues doing that.
Vaclav_ wrote:
Using sudo because it works.
If it only works with sudo then you've seriously borked your system. If commands work without sudo, then please stop doing that ... eventually you're going to do something like
$ cd /bin
do some more things, time passes, you forget where you are ...
$ sudo rm * ##whoops ... there goes everything in /bin .. time to recover from backups or re-install, more likelyDon't tell me it will never happen to you ... it just hasn't happened to you yet. Something like that has happened to almost everyone that has had root privileges on unix or unix-line system system. That's partially why login as root is generally discouraged. But if you insist on prefixing almost everything with sudo, you might as well just enable root login on your system and go from there.
-
Hi, At first glance I thought it had something to do with the old [GNU/Linux naming controversy](https://en.wikipedia.org/wiki/GNU/Linux\_naming\_controversy) as @k5054 is implying. But I think the last field is actually the [C library used by the operating system](https://wiki.osdev.org/C\_Library). I just checked on some of my Qualcomm ARM devices and the fourth field is uClibc. Best Wishes, -David Delaune
-
so that would be armXX-unknown-linux-uClibc, then? Interestingly FreeBSD (i386, 9.1 - old, i know) reports i586-unknown-freebsd9.1. No mention of the the c-library involved.
Well, Rather than speculate about what it could be let's just take a direct look at the latest source code; [gcc/config.guess at master · gcc-mirror/gcc · GitHub](https://github.com/gcc-mirror/gcc/blob/master/config.guess)
case "$UNAME_SYSTEM" in Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
# If ldd exists, use it to detect musl libc.
if command -v ldd >/dev/null && \
ldd --version 2>&1 | grep -q ^musl
then
LIBC=musl
fi
;;
esacSo looks like the possible values are: - gnu - uclibc - dietlibc - musl Best Wishes, -David Delaune
-
Hi, At first glance I thought it had something to do with the old [GNU/Linux naming controversy](https://en.wikipedia.org/wiki/GNU/Linux\_naming\_controversy) as @k5054 is implying. But I think the last field is actually the [C library used by the operating system](https://wiki.osdev.org/C\_Library). I just checked on some of my Qualcomm ARM devices and the fourth field is uClibc. Best Wishes, -David Delaune
It is actually even more convoluted. If I want to cross-compile - in Eclipse IDE I add "prefix "arm-linux-gnueabi- which translates to "arm-linux-gnueabi-gcc" That is the actual name of executable cross compiler, not a meaningless triplet. However , config.guess on Raspberry Pi (armv7l) is "armv7l-unknown-linux-gnueabihf". That implies that the last member is not just some political peeve. All this makes the package I am working on useless ( straight from the box) since it does not use the latest version of config.guess in the first place and has "configure" script with no code provisions to analyze the overgrown triplet.
-
It is actually even more convoluted. If I want to cross-compile - in Eclipse IDE I add "prefix "arm-linux-gnueabi- which translates to "arm-linux-gnueabi-gcc" That is the actual name of executable cross compiler, not a meaningless triplet. However , config.guess on Raspberry Pi (armv7l) is "armv7l-unknown-linux-gnueabihf". That implies that the last member is not just some political peeve. All this makes the package I am working on useless ( straight from the box) since it does not use the latest version of config.guess in the first place and has "configure" script with no code provisions to analyze the overgrown triplet.
Yeah,
Vaclav_ wrote:
If I want to cross-compile - in Eclipse IDE I add "prefix "arm-linux-gnueabi- which translates to "arm-linux-gnueabi-gcc"
Reviewing the [config.guess source](https://github.com/gcc-mirror/gcc/blob/master/config.guess) I can see that it will append libc characteristics.
Vaclav_ wrote:
All this makes the package I am working on useless ( straight from the box) since it does not use the latest version of config.guess in the first place and has "configure" script with no code provisions to analyze the overgrown triplet.
Look, as you probably already know I am primarily a Microsoft technology guy. I left the Linux world over 15 years ago so I am extremely rusty on modern Linux. But I am currently using Linux again on a daily basis and cross-compiling my project so that it will run in Windows, Linux and hopefully any other embedded environments. Maybe you should try my technique for cross compiling... I just build a quick chroot environment and custom-build the toolchain for whatever platform I am targeting. That's the way I've always cross compiled... but maybe I am using outdated techniques. Best Wishes, -David Delaune [EDIT] If you are feeling lazy I found an automated script on GitHub that should get you a working build environment for targeting the Raspberry Pi. [Creates a chroot environment for creating custom Raspbian images and cross-compiling programs for the Raspberry Pi.](https://gist.github.com/kmdouglass/38e1383c7e62745f3cf522702c21cb49)
-
It is actually even more convoluted. If I want to cross-compile - in Eclipse IDE I add "prefix "arm-linux-gnueabi- which translates to "arm-linux-gnueabi-gcc" That is the actual name of executable cross compiler, not a meaningless triplet. However , config.guess on Raspberry Pi (armv7l) is "armv7l-unknown-linux-gnueabihf". That implies that the last member is not just some political peeve. All this makes the package I am working on useless ( straight from the box) since it does not use the latest version of config.guess in the first place and has "configure" script with no code provisions to analyze the overgrown triplet.
If your coming thru a makefile you can pick the compiler OS inside the makefile I always do it because I need to swing between RM and DEL and the directory slash in the makefile You can change the compiler binary in that conditional as well.
ifeq ($(OS), Windows_NT)
#WINDOWS USE THESE DEFINITIONS
RM = -del /q /f
SLASH = \\
else
#LINUX USE THESE DEFINITIONS
RM = -rm -f
SLASH = /
endifSo ......
ifeq ($(OS), Windows_NT)
#WINDOWS USE THESE DEFINITIONS
RM = -del /q /f
SLASH = \\
CC = arm-none-eabi-
else
#LINUX USE THESE DEFINITIONS
RM = -rm -f
SLASH = /
CC = arm-linux-gnueabi-
endifIn vino veritas