mirror of
https://git.planet-casio.com/Lephenixnoir/sh-elf-binutils.git
synced 2025-06-07 03:45:03 +02:00
fixes __ANDROID_API__ flag
This commit is contained in:
parent
a83135ea59
commit
ce4a955306
1 changed files with 16 additions and 1 deletions
17
configure.sh
17
configure.sh
|
@ -115,6 +115,21 @@ mkdir build
|
||||||
PREFIX="$(pwd)"
|
PREFIX="$(pwd)"
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
|
# Since the __ANDROID_API__ flag is hardcoded as 24 in clang, and <stdio.h>
|
||||||
|
# doesn't prototype some functions when this flag is too low, fixes it's
|
||||||
|
# version by checking system's properties so as to prevent from missing prototypes
|
||||||
|
# of existing functions such as fgets_unlocked (only if API >= 28)
|
||||||
|
# See the following issues :
|
||||||
|
# * https://github.com/termux/termux-packages/issues/6176
|
||||||
|
# * https://github.com/termux/termux-packages/issues/2469
|
||||||
|
|
||||||
|
if command -v termux-setup-storage >/dev/null 2>&1; then
|
||||||
|
extra_args="CFLAGS=-D__ANDROID_API__=`getprop ro.build.version.sdk` CXXFLAGS=-D__ANDROID_API__=`getprop ro.build.version.sdk`"
|
||||||
|
else
|
||||||
|
extra_args=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "$TAG Configuring binutils..."
|
echo "$TAG Configuring binutils..."
|
||||||
run_quietly giteapc-configure.log \
|
run_quietly giteapc-configure.log \
|
||||||
../binutils-$VERSION/configure --prefix="$PREFIX" --target=sh3eb-elf --with-multilib-list=m3,m4-nofpu --program-prefix=sh-elf- --enable-libssp --enable-lto
|
../binutils-$VERSION/configure --prefix="$PREFIX" --target=sh3eb-elf --with-multilib-list=m3,m4-nofpu --program-prefix=sh-elf- --enable-libssp --enable-lto $extra_args
|
||||||
|
|
Loading…
Add table
Reference in a new issue