mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-10 10:10:28 +03:00
Compare commits
6 Commits
windows-to
...
godot-2020
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
859537e328 | ||
|
|
5d0ac38a5b | ||
|
|
f729301f65 | ||
|
|
8e2b6a0578 | ||
|
|
aed0242449 | ||
|
|
671d02de5c |
@@ -23,16 +23,16 @@ Unpack the toolchain anywhere you like and run the `relocate-sdk.sh` script with
|
||||
|
||||
After this you can build the engine more-or-less like normal. For instance for `x86_64`:
|
||||
|
||||
`PATH=/home/hp/tmp/x86_64-godot-linux-gnu_sdk-buildroot/usr/bin:$PATH scons p=x11 target=release_debug CC=x86_64-godot-linux-gnu-gcc CXX=x86_64-godot-linux-gnu-g++ -j64`
|
||||
`PATH=/home/hp/tmp/x86_64-godot-linux-gnu_sdk-buildroot/bin:$PATH scons p=x11 target=release_debug -j64 use_static_cpp=yes`
|
||||
|
||||
For 32-bit Intel:
|
||||
|
||||
`PATH=/home/hp/tmp/i686-godot-linux-gnu_sdk-buildroot/usr/bin/:$PATH scons p=x11 target=release_debug CC=i686-godot-linux-gnu-gcc CXX=i686-godot-linux-gnu-g++ -j64 use_static_cpp=yes bits=32`
|
||||
`PATH=/home/hp/tmp/i686-godot-linux-gnu_sdk-buildroot/bin/:$PATH scons p=x11 target=release_debug -j64 use_static_cpp=yes bits=32`
|
||||
*Note the `bits=32` at the end!*
|
||||
|
||||
And for 32bit ARM:
|
||||
|
||||
`PATH=/home/hp/tmp/arm-godot-linux-gnueabihf_sdk-buildroot/usr/bin/:$PATH scons p=x11 target=release_debug CC=arm-linux-gcc CXX=arm-linux-g++ -j64 use_static_cpp=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_denoise_enabled=no module_raycast_enabled=no module_webm_enabled=no`
|
||||
`PATH=/home/hp/tmp/arm-godot-linux-gnueabihf_sdk-buildroot/bin/:$PATH scons p=x11 target=release_debug -j64 use_static_cpp=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_denoise_enabled=no module_raycast_enabled=no module_webm_enabled=no`
|
||||
|
||||
For other build-time options please see https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ target_dir="${base_dir}/${target_arch}_sdk-buildroot"
|
||||
function unpack_linux_sdk() {
|
||||
mkdir -p "${base_dir}"
|
||||
tar xf "${godot_toolchain_dir}/${target_arch}_sdk-buildroot.tar.bz2" -C "${base_dir}"
|
||||
rm "${target_dir}/bin/"{gcc,g++,cpp,ar,ranlib,gcc-ar,gcc-ranlib}
|
||||
}
|
||||
|
||||
function pack_windows_sdk() {
|
||||
@@ -140,7 +141,29 @@ function build_gcc() {
|
||||
mkdir -p "${base_dir}/build/gcc"
|
||||
pushd "${base_dir}/build/gcc"
|
||||
|
||||
"${base_dir}/src/gcc/configure" --prefix=${target_dir} --sysconfdir=${target_dir}/etc --enable-static --host=x86_64-w64-mingw32 --build=x86_64-linux-gnu --target=${target_arch} --with-sysroot=${target_dir}/${target_arch}/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --without-zstd --enable-libquadmath --enable-tls --enable-threads --with-arch=nocona --enable-languages=c,c++ --enable-shared --disable-libgomp --disable-libstdcxx --with-static-standard-libraries LDFLAGS="-lssp"
|
||||
flags="$(${target_dir}/bin/${target_arch}-gcc -v 2>&1 | grep Configured\ with:)"
|
||||
skip="prefix sysconfdir with-sysroot with-gmp with-mpc with-mpfr with-pkgversion with-bugurl with-isl with-build-time-tools"
|
||||
newflags="--prefix=${target_dir} --sysconfdir=${target_dir}/etc --enable-static --host=x86_64-w64-mingw32 --build=x86_64-linux-gnu --with-sysroot=${target_dir}/${target_arch}/sysroot --with-static-standard-libraries"
|
||||
|
||||
for flag in ${flags}; do
|
||||
keep=1
|
||||
if ! echo ${flag} | grep -qE '^--'; then
|
||||
keep=0
|
||||
fi
|
||||
|
||||
for s in ${skip}; do
|
||||
if echo ${flag} | grep -qE "^--${s}"; then
|
||||
keep=0
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${keep} -eq 1 ]; then
|
||||
newflags="${newflags} ${flag}"
|
||||
fi
|
||||
done
|
||||
|
||||
"${base_dir}/src/gcc/configure" ${newflags} LDFLAGS="-lssp"
|
||||
make -j
|
||||
make install-strip
|
||||
popd
|
||||
|
||||
@@ -88,12 +88,15 @@ if [ -L ${arch}/sysroot/usr/${libdir_to_keep} ]; then
|
||||
mv ${arch}/sysroot/usr/${libdir_to_keep}/pulseaudio ${arch}/sysroot/usr/${libdir_to_remove}
|
||||
fi
|
||||
|
||||
ln -s ${arch}-gcc bin/gcc
|
||||
ln -s ${arch}-gcc.br_real bin/gcc.br_real
|
||||
ln -s ${arch}-g++ bin/g++
|
||||
ln -s ${arch}-g++.br_real bin/g++.br_real
|
||||
ln -s ${arch}-cpp bin/cpp
|
||||
ln -s ${arch}-cpp.br_real bin/cpp.br_real
|
||||
ln -s ${arch}-ar bin/ar
|
||||
ln -s ${arch}-ranlib bin/ranlib
|
||||
ln -s ${arch}-gcc-ar bin/gcc-ar
|
||||
ln -s ${arch}-gcc-ranlib bin/gcc-ranlib
|
||||
|
||||
find -name *python2* -exec rm -rf {} \; || true
|
||||
|
||||
ln -s bin/gcc ${arch}-gcc
|
||||
ln -s bin/g++ ${arch}-g++
|
||||
ln -s bin/ar ${arch}-ar
|
||||
ln -s bin/ranlib ${arch}-ranlib
|
||||
ln -s bin/gcc-ar ${arch}-gcc-ar
|
||||
ln -s bin/gcc-ranlib ${arch}-gcc-ranlib
|
||||
|
||||
|
||||
Reference in New Issue
Block a user