How to find out triplet without gcc?
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I try to find out the triplet for my device, because i try to cross compile, but there is no gcc installed on the target device and i am not allowed to install it.
With gcc installed i could just write gcc -dumpmachine
Is it possible to find this information without gcc?
cross-compilation
 |Â
show 3 more comments
up vote
3
down vote
favorite
I try to find out the triplet for my device, because i try to cross compile, but there is no gcc installed on the target device and i am not allowed to install it.
With gcc installed i could just write gcc -dumpmachine
Is it possible to find this information without gcc?
cross-compilation
1
how far willuname -a
get you here?
â Fiximan
Aug 25 '15 at 11:59
i getLinux MyDeviceName 2.6.35.3-571-gcca29a0-g8b63513-dirty #162 PREEMPT Tue Aug 4 10:57:29 CEST 2015 armv5tejl GNU/Linux
â Black
Aug 25 '15 at 12:09
1
Can you tell us the manufacturer and model of the target device, for exampleFreescale MX28EVK
?
â Mark Plotnick
Aug 25 '15 at 12:15
No i can't, its a small special device with a metal housing and nothing written on it.
â Black
Aug 25 '15 at 12:21
1
So you have aarmv5tejl
core,GNU/Linux
as OS, and if you really need the vendor, too, trylshw -class cpu
and ignore the "should be run as super-user" part.
â Fiximan
Aug 25 '15 at 12:23
 |Â
show 3 more comments
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I try to find out the triplet for my device, because i try to cross compile, but there is no gcc installed on the target device and i am not allowed to install it.
With gcc installed i could just write gcc -dumpmachine
Is it possible to find this information without gcc?
cross-compilation
I try to find out the triplet for my device, because i try to cross compile, but there is no gcc installed on the target device and i am not allowed to install it.
With gcc installed i could just write gcc -dumpmachine
Is it possible to find this information without gcc?
cross-compilation
cross-compilation
edited Apr 13 '17 at 12:36
Communityâ¦
1
1
asked Aug 25 '15 at 11:50
Black
4932728
4932728
1
how far willuname -a
get you here?
â Fiximan
Aug 25 '15 at 11:59
i getLinux MyDeviceName 2.6.35.3-571-gcca29a0-g8b63513-dirty #162 PREEMPT Tue Aug 4 10:57:29 CEST 2015 armv5tejl GNU/Linux
â Black
Aug 25 '15 at 12:09
1
Can you tell us the manufacturer and model of the target device, for exampleFreescale MX28EVK
?
â Mark Plotnick
Aug 25 '15 at 12:15
No i can't, its a small special device with a metal housing and nothing written on it.
â Black
Aug 25 '15 at 12:21
1
So you have aarmv5tejl
core,GNU/Linux
as OS, and if you really need the vendor, too, trylshw -class cpu
and ignore the "should be run as super-user" part.
â Fiximan
Aug 25 '15 at 12:23
 |Â
show 3 more comments
1
how far willuname -a
get you here?
â Fiximan
Aug 25 '15 at 11:59
i getLinux MyDeviceName 2.6.35.3-571-gcca29a0-g8b63513-dirty #162 PREEMPT Tue Aug 4 10:57:29 CEST 2015 armv5tejl GNU/Linux
â Black
Aug 25 '15 at 12:09
1
Can you tell us the manufacturer and model of the target device, for exampleFreescale MX28EVK
?
â Mark Plotnick
Aug 25 '15 at 12:15
No i can't, its a small special device with a metal housing and nothing written on it.
â Black
Aug 25 '15 at 12:21
1
So you have aarmv5tejl
core,GNU/Linux
as OS, and if you really need the vendor, too, trylshw -class cpu
and ignore the "should be run as super-user" part.
â Fiximan
Aug 25 '15 at 12:23
1
1
how far will
uname -a
get you here?â Fiximan
Aug 25 '15 at 11:59
how far will
uname -a
get you here?â Fiximan
Aug 25 '15 at 11:59
i get
Linux MyDeviceName 2.6.35.3-571-gcca29a0-g8b63513-dirty #162 PREEMPT Tue Aug 4 10:57:29 CEST 2015 armv5tejl GNU/Linux
â Black
Aug 25 '15 at 12:09
i get
Linux MyDeviceName 2.6.35.3-571-gcca29a0-g8b63513-dirty #162 PREEMPT Tue Aug 4 10:57:29 CEST 2015 armv5tejl GNU/Linux
â Black
Aug 25 '15 at 12:09
1
1
Can you tell us the manufacturer and model of the target device, for example
Freescale MX28EVK
?â Mark Plotnick
Aug 25 '15 at 12:15
Can you tell us the manufacturer and model of the target device, for example
Freescale MX28EVK
?â Mark Plotnick
Aug 25 '15 at 12:15
No i can't, its a small special device with a metal housing and nothing written on it.
â Black
Aug 25 '15 at 12:21
No i can't, its a small special device with a metal housing and nothing written on it.
â Black
Aug 25 '15 at 12:21
1
1
So you have a
armv5tejl
core, GNU/Linux
as OS, and if you really need the vendor, too, try lshw -class cpu
and ignore the "should be run as super-user" part.â Fiximan
Aug 25 '15 at 12:23
So you have a
armv5tejl
core, GNU/Linux
as OS, and if you really need the vendor, too, try lshw -class cpu
and ignore the "should be run as super-user" part.â Fiximan
Aug 25 '15 at 12:23
 |Â
show 3 more comments
3 Answers
3
active
oldest
votes
up vote
3
down vote
You can get a lot of information by means of uname
and also by checking with file
the type of executables:
$ gcc -dumpmachine
x86_64-linux-gnu
$ uname -o -m
x86_64 GNU/Linux
$ file /usr/bin/file
/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d8ac02806880576708bf189c064fca78ea89f1d0, stripped
If your device doesn't have file
installed, copy a binary executable from it to another Linux computer and run file
there.
Thank you for your answer. Where can i find a binary executable? Under /usr/bin ? Sorry, im pretty much beginner, so an example would be great.
â Black
Aug 26 '15 at 6:18
1
If you got the file command as shown in the snippet above you can use it itself as executable example. Otherwise any other file in /usr/bin should do.
â planetmaker
Aug 26 '15 at 6:54
add a comment |Â
up vote
1
down vote
You'll need to find files in the file system which preserve the triplet passed to / probed by configure
on the build time of your target userland.
In common GNU/Linux distributions the best bet would be querying to common command binaries like bash
curl
make
svn
. In the following example on Debian/armhf (QEMU image taken from here) I got the canonical triplet arm-unknown-linux-gnueabihf
by bash --version
. So it would be basically safe to configure my cross toolchain for this system by /path/to/configure --target=arm-unknown-linux-gnueabihf
.
root@debian-armhf:~# bash --version
GNU bash, version 4.2.37(1)-release (arm-unknown-linux-gnueabihf)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
There's no reliable way to know non-canonical triplet like arm-linux-gnueabihf
x86_64-linux-gnu
from the userland, and there might be distribution specific conventions like Debian multiarch and tuples. You'll need to collect info from your distribution's document or other resources online.
Thx for your answer, but unfortunattely the command "bash" is not available too.
â Black
Aug 26 '15 at 11:34
Which distribution are you using
â Erkin Alp Güney
Apr 23 '17 at 13:49
add a comment |Â
up vote
0
down vote
Another option is make -v
. In my laptop:
$ make -v
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Then built triple is x86_64-pc-linux-gnu
.
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
You can get a lot of information by means of uname
and also by checking with file
the type of executables:
$ gcc -dumpmachine
x86_64-linux-gnu
$ uname -o -m
x86_64 GNU/Linux
$ file /usr/bin/file
/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d8ac02806880576708bf189c064fca78ea89f1d0, stripped
If your device doesn't have file
installed, copy a binary executable from it to another Linux computer and run file
there.
Thank you for your answer. Where can i find a binary executable? Under /usr/bin ? Sorry, im pretty much beginner, so an example would be great.
â Black
Aug 26 '15 at 6:18
1
If you got the file command as shown in the snippet above you can use it itself as executable example. Otherwise any other file in /usr/bin should do.
â planetmaker
Aug 26 '15 at 6:54
add a comment |Â
up vote
3
down vote
You can get a lot of information by means of uname
and also by checking with file
the type of executables:
$ gcc -dumpmachine
x86_64-linux-gnu
$ uname -o -m
x86_64 GNU/Linux
$ file /usr/bin/file
/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d8ac02806880576708bf189c064fca78ea89f1d0, stripped
If your device doesn't have file
installed, copy a binary executable from it to another Linux computer and run file
there.
Thank you for your answer. Where can i find a binary executable? Under /usr/bin ? Sorry, im pretty much beginner, so an example would be great.
â Black
Aug 26 '15 at 6:18
1
If you got the file command as shown in the snippet above you can use it itself as executable example. Otherwise any other file in /usr/bin should do.
â planetmaker
Aug 26 '15 at 6:54
add a comment |Â
up vote
3
down vote
up vote
3
down vote
You can get a lot of information by means of uname
and also by checking with file
the type of executables:
$ gcc -dumpmachine
x86_64-linux-gnu
$ uname -o -m
x86_64 GNU/Linux
$ file /usr/bin/file
/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d8ac02806880576708bf189c064fca78ea89f1d0, stripped
If your device doesn't have file
installed, copy a binary executable from it to another Linux computer and run file
there.
You can get a lot of information by means of uname
and also by checking with file
the type of executables:
$ gcc -dumpmachine
x86_64-linux-gnu
$ uname -o -m
x86_64 GNU/Linux
$ file /usr/bin/file
/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d8ac02806880576708bf189c064fca78ea89f1d0, stripped
If your device doesn't have file
installed, copy a binary executable from it to another Linux computer and run file
there.
edited Aug 25 '15 at 23:06
Gilles
511k12010141543
511k12010141543
answered Aug 25 '15 at 12:01
planetmaker
25918
25918
Thank you for your answer. Where can i find a binary executable? Under /usr/bin ? Sorry, im pretty much beginner, so an example would be great.
â Black
Aug 26 '15 at 6:18
1
If you got the file command as shown in the snippet above you can use it itself as executable example. Otherwise any other file in /usr/bin should do.
â planetmaker
Aug 26 '15 at 6:54
add a comment |Â
Thank you for your answer. Where can i find a binary executable? Under /usr/bin ? Sorry, im pretty much beginner, so an example would be great.
â Black
Aug 26 '15 at 6:18
1
If you got the file command as shown in the snippet above you can use it itself as executable example. Otherwise any other file in /usr/bin should do.
â planetmaker
Aug 26 '15 at 6:54
Thank you for your answer. Where can i find a binary executable? Under /usr/bin ? Sorry, im pretty much beginner, so an example would be great.
â Black
Aug 26 '15 at 6:18
Thank you for your answer. Where can i find a binary executable? Under /usr/bin ? Sorry, im pretty much beginner, so an example would be great.
â Black
Aug 26 '15 at 6:18
1
1
If you got the file command as shown in the snippet above you can use it itself as executable example. Otherwise any other file in /usr/bin should do.
â planetmaker
Aug 26 '15 at 6:54
If you got the file command as shown in the snippet above you can use it itself as executable example. Otherwise any other file in /usr/bin should do.
â planetmaker
Aug 26 '15 at 6:54
add a comment |Â
up vote
1
down vote
You'll need to find files in the file system which preserve the triplet passed to / probed by configure
on the build time of your target userland.
In common GNU/Linux distributions the best bet would be querying to common command binaries like bash
curl
make
svn
. In the following example on Debian/armhf (QEMU image taken from here) I got the canonical triplet arm-unknown-linux-gnueabihf
by bash --version
. So it would be basically safe to configure my cross toolchain for this system by /path/to/configure --target=arm-unknown-linux-gnueabihf
.
root@debian-armhf:~# bash --version
GNU bash, version 4.2.37(1)-release (arm-unknown-linux-gnueabihf)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
There's no reliable way to know non-canonical triplet like arm-linux-gnueabihf
x86_64-linux-gnu
from the userland, and there might be distribution specific conventions like Debian multiarch and tuples. You'll need to collect info from your distribution's document or other resources online.
Thx for your answer, but unfortunattely the command "bash" is not available too.
â Black
Aug 26 '15 at 11:34
Which distribution are you using
â Erkin Alp Güney
Apr 23 '17 at 13:49
add a comment |Â
up vote
1
down vote
You'll need to find files in the file system which preserve the triplet passed to / probed by configure
on the build time of your target userland.
In common GNU/Linux distributions the best bet would be querying to common command binaries like bash
curl
make
svn
. In the following example on Debian/armhf (QEMU image taken from here) I got the canonical triplet arm-unknown-linux-gnueabihf
by bash --version
. So it would be basically safe to configure my cross toolchain for this system by /path/to/configure --target=arm-unknown-linux-gnueabihf
.
root@debian-armhf:~# bash --version
GNU bash, version 4.2.37(1)-release (arm-unknown-linux-gnueabihf)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
There's no reliable way to know non-canonical triplet like arm-linux-gnueabihf
x86_64-linux-gnu
from the userland, and there might be distribution specific conventions like Debian multiarch and tuples. You'll need to collect info from your distribution's document or other resources online.
Thx for your answer, but unfortunattely the command "bash" is not available too.
â Black
Aug 26 '15 at 11:34
Which distribution are you using
â Erkin Alp Güney
Apr 23 '17 at 13:49
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You'll need to find files in the file system which preserve the triplet passed to / probed by configure
on the build time of your target userland.
In common GNU/Linux distributions the best bet would be querying to common command binaries like bash
curl
make
svn
. In the following example on Debian/armhf (QEMU image taken from here) I got the canonical triplet arm-unknown-linux-gnueabihf
by bash --version
. So it would be basically safe to configure my cross toolchain for this system by /path/to/configure --target=arm-unknown-linux-gnueabihf
.
root@debian-armhf:~# bash --version
GNU bash, version 4.2.37(1)-release (arm-unknown-linux-gnueabihf)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
There's no reliable way to know non-canonical triplet like arm-linux-gnueabihf
x86_64-linux-gnu
from the userland, and there might be distribution specific conventions like Debian multiarch and tuples. You'll need to collect info from your distribution's document or other resources online.
You'll need to find files in the file system which preserve the triplet passed to / probed by configure
on the build time of your target userland.
In common GNU/Linux distributions the best bet would be querying to common command binaries like bash
curl
make
svn
. In the following example on Debian/armhf (QEMU image taken from here) I got the canonical triplet arm-unknown-linux-gnueabihf
by bash --version
. So it would be basically safe to configure my cross toolchain for this system by /path/to/configure --target=arm-unknown-linux-gnueabihf
.
root@debian-armhf:~# bash --version
GNU bash, version 4.2.37(1)-release (arm-unknown-linux-gnueabihf)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
There's no reliable way to know non-canonical triplet like arm-linux-gnueabihf
x86_64-linux-gnu
from the userland, and there might be distribution specific conventions like Debian multiarch and tuples. You'll need to collect info from your distribution's document or other resources online.
answered Aug 26 '15 at 10:44
yaegashi
7,89611432
7,89611432
Thx for your answer, but unfortunattely the command "bash" is not available too.
â Black
Aug 26 '15 at 11:34
Which distribution are you using
â Erkin Alp Güney
Apr 23 '17 at 13:49
add a comment |Â
Thx for your answer, but unfortunattely the command "bash" is not available too.
â Black
Aug 26 '15 at 11:34
Which distribution are you using
â Erkin Alp Güney
Apr 23 '17 at 13:49
Thx for your answer, but unfortunattely the command "bash" is not available too.
â Black
Aug 26 '15 at 11:34
Thx for your answer, but unfortunattely the command "bash" is not available too.
â Black
Aug 26 '15 at 11:34
Which distribution are you using
â Erkin Alp Güney
Apr 23 '17 at 13:49
Which distribution are you using
â Erkin Alp Güney
Apr 23 '17 at 13:49
add a comment |Â
up vote
0
down vote
Another option is make -v
. In my laptop:
$ make -v
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Then built triple is x86_64-pc-linux-gnu
.
add a comment |Â
up vote
0
down vote
Another option is make -v
. In my laptop:
$ make -v
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Then built triple is x86_64-pc-linux-gnu
.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Another option is make -v
. In my laptop:
$ make -v
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Then built triple is x86_64-pc-linux-gnu
.
Another option is make -v
. In my laptop:
$ make -v
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Then built triple is x86_64-pc-linux-gnu
.
answered Sep 8 at 12:17
Mark J. Adams
252213
252213
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f225350%2fhow-to-find-out-triplet-without-gcc%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
how far will
uname -a
get you here?â Fiximan
Aug 25 '15 at 11:59
i get
Linux MyDeviceName 2.6.35.3-571-gcca29a0-g8b63513-dirty #162 PREEMPT Tue Aug 4 10:57:29 CEST 2015 armv5tejl GNU/Linux
â Black
Aug 25 '15 at 12:09
1
Can you tell us the manufacturer and model of the target device, for example
Freescale MX28EVK
?â Mark Plotnick
Aug 25 '15 at 12:15
No i can't, its a small special device with a metal housing and nothing written on it.
â Black
Aug 25 '15 at 12:21
1
So you have a
armv5tejl
core,GNU/Linux
as OS, and if you really need the vendor, too, trylshw -class cpu
and ignore the "should be run as super-user" part.â Fiximan
Aug 25 '15 at 12:23