「インストール - GCC」の版間の差分

758行目: 758行目:
<code>ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes</code>オプションを付加する。<br>
<code>ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes</code>オプションを付加する。<br>
これは、autotoolsの仕様で、GLIBC以外のシステム(例. uClibc等)を使用しているからである。<br>
これは、autotoolsの仕様で、GLIBC以外のシステム(例. uClibc等)を使用しているからである。<br>
  # 32bit Cortex-A(Hard Float版)向けにビルドする場合
  # 32bit Cortex-A (Hard Float) 向けにビルドする場合
  ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes \
  ac_cv_func_malloc_0_nonnull=yes \
  ../configure --prefix=<ソフトウェアのインストールディレクトリ> \
ac_cv_func_realloc_0_nonnull=yes \
CC=/<GCC_ARMのインストールディレクトリ>/bin/arm-none-linux-gnueabihf-gcc \
  ../configure --prefix=<ソフトウェアのインストールディレクトリ>                             \
CXX=/<GCC_ARMのインストールディレクトリ>/bin/arm-none-linux-gnueabihf-g++ \
              CC=/<GCC_ARMのインストールディレクトリ>/bin/arm-none-linux-gnueabihf-gcc \
--build=x86_64-unknown-linux-gnu --host=arm-none-linux-gnueabihf --target=arm-none-linux-gnueabihf \
              CXX=/<GCC_ARMのインストールディレクトリ>/bin/arm-none-linux-gnueabihf-g++ \
--with-sysroot=/<GCC_ARMのインストールディレクトリ>/arm-none-linux-gnueabihf/libc --with-gnu-ld
              --build=x86_64-unknown-linux-gnu                                 \
              --host=arm-none-linux-gnueabihf                                   \
              --target=arm-none-linux-gnueabihf                                 \
              --with-sysroot=/<GCC_ARMのインストールディレクトリ>/arm-none-linux-gnueabihf/libc \
              --with-gnu-ld
   
   
  make -j $(nproc) LDFLAGS="-L/<GCC_ARMのインストールディレクトリ>/arm-none-linux-gnueabihf/lib" \
  make -j $(nproc) LDFLAGS="-L/<GCC_ARMのインストールディレクトリ>/arm-none-linux-gnueabihf/lib" \
CFLAGS="-I/<GCC_ARMのインストールディレクトリ>/arm-none-linux-gnueabihf/include"
                  CFLAGS="-I/<GCC_ARMのインストールディレクトリ>/arm-none-linux-gnueabihf/include"
  make install
  make install
<br>
<br>
  # 64bit Cortex-A向けにビルドする場合
  # 64bit Cortex-A向けにビルドする場合
  ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes \
  ac_cv_func_malloc_0_nonnull=yes \
  ../configure --prefix=<ソフトウェアのインストールディレクトリ> \
ac_cv_func_realloc_0_nonnull=yes \
CC=/<GCC_ARMのインストールディレクトリ>/bin/aarch64-none-linux-gnu-gcc \
  ../configure --prefix=<ソフトウェアのインストールディレクトリ>                           \
CXX=/<GCC_ARMのインストールディレクトリ>/bin/aarch64-none-linux-gnu-g++ \  
              CC=/<GCC_ARMのインストールディレクトリ>/bin/aarch64-none-linux-gnu-gcc \
--build=x86_64-unknown-linux-gnu --host=aarch64-none-linux-gnu --target=aarch64-none-linux-gnu \
              CXX=/<GCC_ARMのインストールディレクトリ>/bin/aarch64-none-linux-gnu-g++ \  
--with-sysroot=/<GCC_ARMのインストールディレクトリ>/aarch64-none-linux-gnu/libc --with-gnu-ld
              --build=x86_64-unknown-linux-gnu                               \
              --host=aarch64-none-linux-gnu                                   \
              --target=aarch64-none-linux-gnu                                 \
              --with-sysroot=/<GCC_ARMのインストールディレクトリ>/aarch64-none-linux-gnu/libc \
              --with-gnu-ld
   
   
  make -j $(nproc) LDFLAGS="-L/<GCC_ARMのインストールディレクトリ>/aarch64-none-linux-gnu/lib64" \
  make -j $(nproc) LDFLAGS="-L/<GCC_ARMのインストールディレクトリ>/aarch64-none-linux-gnu/lib64" \
CFLAGS="-I/<GCC_ARMのインストールディレクトリ>/aarch64-none-linux-gnu/include"
                  CFLAGS="-I/<GCC_ARMのインストールディレクトリ>/aarch64-none-linux-gnu/include"
  make install
  make install
<br>
<br>
787行目: 793行目:
以下の例では、SourceForgeからダウンロードした<u>Raspberry Pi専用のGCC ARMツールチェーン</u>を使用して、<br>
以下の例では、SourceForgeからダウンロードした<u>Raspberry Pi専用のGCC ARMツールチェーン</u>を使用して、<br>
任意のソフトウェアをRaspberry Pi向けにビルドしている。<br>
任意のソフトウェアをRaspberry Pi向けにビルドしている。<br>
  # Raspberry Pi OS 32ビットの場合
  # Raspberry Pi OS 32ビットの場合
  ac_cv_func_malloc_0_nonnull=yes  \
  ac_cv_func_malloc_0_nonnull=yes  \
  ac_cv_func_realloc_0_nonnull=yes \
  ac_cv_func_realloc_0_nonnull=yes \
800行目: 806行目:
  make install
  make install
   
   
  # Raspberry Pi OS 64ビットの場合
  # Raspberry Pi OS 64ビットの場合
  ../configure --prefix=<ソフトウェアのインストールディレクトリ>                    \
  ../configure --prefix=<ソフトウェアのインストールディレクトリ>                    \
               CC=/<GCC_ARMのインストールディレクトリ>/bin/aarch64-linux-gnu-gcc  \
               CC=/<GCC_ARMのインストールディレクトリ>/bin/aarch64-linux-gnu-gcc  \