인디노트

Ubuntu 16 Cross Compile : update-alternatives 본문

개발 플랫폼 및 언어

Ubuntu 16 Cross Compile : update-alternatives

인디개발자 2021. 8. 23. 16:24

root@ubuntu16:/# update-alternatives --config gcc
There are 8 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path                               Priority   Status
------------------------------------------------------------
  0            /usr/bin/x86_64-linux-gnu-gcc-4.8   50        auto mode
* 1            /usr/bin/aarch64-linux-gnu-gcc      30        manual mode
  2            /usr/bin/arm-linux-gnueabi-gcc      30        manual mode
  3            /usr/bin/arm-linux-gnueabihf-gcc    30        manual mode
  4            /usr/bin/arm-none-eabi-gcc          30        manual mode
  5            /usr/bin/i686-w64-mingw32-gcc       30        manual mode
  6            /usr/bin/x86_64-linux-gnu-gcc-4.8   50        manual mode
  7            /usr/bin/x86_64-linux-gnu-gcc-5     40        manual mode
  8            /usr/bin/x86_64-w64-mingw32-gcc     30        manual mode

Press <enter> to keep the current choice[*], or type selection number:

 

 

참고 : vi /var/lib/dpkg/alternatives/gcc 파일을 확인해 보면 좋다.

 

 

root@ubuntu16:~# cat /var/lib/dpkg/alternatives/gcc
auto
/usr/bin/gcc
ar
/usr/bin/ar
as
/usr/bin/as
cpp
/usr/bin/cpp
g++
/usr/bin/g++
ld
/usr/bin/ld
ranlib
/usr/bin/ranlib
strip
/usr/bin/strip

/usr/bin/aarch64-linux-gnu-gcc
30
/usr/bin/aarch64-linux-gnu-ar
/usr/bin/aarch64-linux-gnu-as
/usr/bin/aarch64-linux-gnu-cpp
/usr/bin/aarch64-linux-gnu-g++
/usr/bin/aarch64-linux-gnu-ld
/usr/bin/aarch64-linux-gnu-gcc-ranlib
/usr/bin/aarch64-linux-gnu-strip
/usr/bin/arm-linux-gnueabi-gcc
30
/usr/bin/arm-linux-gnueabi-gcc-ar
/usr/bin/arm-linux-gnueabi-as
/usr/bin/arm-linux-gnueabi-cpp
/usr/bin/arm-linux-gnueabi-g++
/usr/bin/arm-linux-gnueabi-ld
/usr/bin/arm-linux-gnueabi-gcc-ranlib
/usr/bin/arm-linux-gnueabi-strip
/usr/bin/arm-linux-gnueabihf-gcc-4.7
30
/usr/bin/arm-linux-gnueabihf-gcc-ar-4.7
/usr/bin/arm-linux-gnueabihf-as
/usr/bin/arm-linux-gnueabihf-cpp-4.7
/usr/bin/arm-linux-gnueabihf-g++-4.7
/usr/bin/arm-linux-gnueabihf-ld
/usr/bin/arm-linux-gnueabihf-gcc-ranlib-4.7
/usr/bin/arm-linux-gnueabihf-strip
/usr/bin/arm-none-eabi-gcc
30
/usr/bin/arm-none-eabi-ar
/usr/bin/arm-none-eabi-as
/usr/bin/arm-none-eabi-cpp
/usr/bin/arm-none-eabi-g++
/usr/bin/arm-none-eabi-ld
/usr/bin/arm-none-eabi-ranlib
/usr/bin/arm-none-eabi-strip
/usr/bin/x86_64-linux-gnu-gcc-4.7
40
/usr/bin/x86_64-linux-gnu-ar
/usr/bin/x86_64-linux-gnu-as
/usr/bin/x86_64-linux-gnu-cpp-4.7
/usr/bin/x86_64-linux-gnu-g++-4.7
/usr/bin/x86_64-linux-gnu-ld
/usr/bin/x86_64-linux-gnu-ranlib
/usr/bin/x86_64-linux-gnu-strip
/usr/bin/x86_64-linux-gnu-gcc-4.8
50
/usr/bin/x86_64-linux-gnu-ar
/usr/bin/x86_64-linux-gnu-as
/usr/bin/x86_64-linux-gnu-cpp-4.8
/usr/bin/x86_64-linux-gnu-g++-4.8
/usr/bin/x86_64-linux-gnu-ld
/usr/bin/x86_64-linux-gnu-ranlib
/usr/bin/x86_64-linux-gnu-strip
/usr/bin/x86_64-linux-gnu-gcc-5
40
/usr/bin/x86_64-linux-gnu-ar
/usr/bin/x86_64-linux-gnu-as
/usr/bin/x86_64-linux-gnu-cpp
/usr/bin/x86_64-linux-gnu-g++
/usr/bin/x86_64-linux-gnu-ld
/usr/bin/x86_64-linux-gnu-ranlib
/usr/bin/x86_64-linux-gnu-strip
/usr/bin/i686-w64-mingw32-gcc
30
/usr/bin/i686-w64-mingw32-ar
/usr/bin/i686-w64-mingw32-as
/usr/bin/i686-w64-mingw32-cpp
/usr/bin/i686-w64-mingw32-g++
/usr/bin/i686-w64-mingw32-ld
/usr/bin/i686-w64-mingw32-ranlib
/usr/bin/i686-w64-mingw32-strip
/usr/bin/x86_64-w64-mingw32-gcc
30
/usr/bin/x86_64-w64-mingw32-ar
/usr/bin/x86_64-w64-mingw32-as
/usr/bin/x86_64-w64-mingw32-cpp
/usr/bin/x86_64-w64-mingw32-g++
/usr/bin/x86_64-w64-mingw32-ld
/usr/bin/x86_64-w64-mingw32-ranlib
/usr/bin/x86_64-w64-mingw32-strip
반응형
Comments