diff --git a/packages/aapt/build.sh b/packages/aapt/build.sh index 4ac677ab6..e8ba90c93 100644 --- a/packages/aapt/build.sh +++ b/packages/aapt/build.sh @@ -102,18 +102,7 @@ termux_step_make_install() { socket_network_client_unix.c \ sockets_unix.o \ str_parms.c" - # -D_FORTIFY_SOURCE=2 makes debug build fail with: - # In file included from process_name.c:29: - # /data/data/com.termux/files/usr/include/aosp/cutils/properties.h:116:45: error: expected identifier - # __errordecl(__property_get_too_small_error, "property_get() called with too small of a buffer"); - # ^ - # /data/data/com.termux/files/usr/include/aosp/cutils/properties.h:119:5: error: static declaration of 'property_get' follows non-static declaration - # int property_get(const char *key, char *value, const char *default_value) { - # ^ - # /data/data/com.termux/files/usr/include/aosp/cutils/properties.h:46:5: note: previous declaration is here - # int property_get(const char *key, char *value, const char *default_value); - $CC ${CFLAGS/-D_FORTIFY_SOURCE=2/} \ - $LDFLAGS \ + $CC $LDFLAGS \ -Dchar16_t=uint16_t \ -std=c11 \ -isystem $AOSP_INCLUDE_DIR \ diff --git a/packages/binutils/build.sh b/packages/binutils/build.sh index 4a5962b89..27f3851d3 100644 --- a/packages/binutils/build.sh +++ b/packages/binutils/build.sh @@ -13,17 +13,6 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-gold --enable-plugins --disable-werror TERMUX_PKG_EXTRA_MAKE_ARGS="tooldir=$TERMUX_PREFIX" TERMUX_PKG_RM_AFTER_INSTALL="share/man/man1/windmc.1 share/man/man1/windres.1 bin/ld.bfd" TERMUX_PKG_NO_STATICSPLIT=true -TERMUX_PKG_HAS_DEBUG=false -# Debug build fails with -# ~/termux-build/binutils/src/binutils/readelf.c:19060:81: error: in call to 'fread', size * count is too large for the given buffer -# if (fread (ehdr32.e_type, sizeof (ehdr32) - EI_NIDENT, 1, filedata->handle) != 1) -# ^ -# ~/termux-build/_cache/19b-aarch64-24-v5/bin/../sysroot/usr/include/bits/fortify/stdio.h:107:9: note: from 'diagnose_if' attribute on 'fread': -# __clang_error_if(__bos(buf) != __BIONIC_FORTIFY_UNKNOWN_SIZE && size * count > __bos(buf), -# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# ~/termux-build/_cache/19b-aarch64-24-v5/bin/../sysroot/usr/include/sys/cdefs.h:163:52: note: expanded from macro '__clang_error_if' -# #define __clang_error_if(cond, msg) __attribute__((diagnose_if(cond, msg, "error"))) -# ^ ~~~~ # Avoid linking against libfl.so from flex if available: export LEXLIB= diff --git a/packages/datamash/build.sh b/packages/datamash/build.sh index 7aa268bc4..11f673164 100644 --- a/packages/datamash/build.sh +++ b/packages/datamash/build.sh @@ -6,16 +6,3 @@ TERMUX_PKG_VERSION=1.7 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/datamash/datamash-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=574a592bb90c5ae702ffaed1b59498d5e3e7466a8abf8530c5f2f3f11fa4adb3 TERMUX_PKG_BUILD_IN_SRC=true - -termux_step_pre_configure() { - if $TERMUX_DEBUG; then - # When doing debug build, -D_FORTIFY_SOURCE=2 gives this error: - # /home/builder/.termux-build/_cache/19b-aarch64-24-v5/bin/../sysroot/usr/include/bits/fortify/stdio.h:51:53: error: use of undeclared identifier '__USE_FORTIFY_LEVEL' - # return __builtin___vsnprintf_chk(dest, size, 0, __bos(dest), format, ap); - # ^ - # lib/cdefs.h:123:48: note: expanded from macro '__bos' - # #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) - # ^ - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi -} diff --git a/packages/diffutils/build.sh b/packages/diffutils/build.sh index ee9a5b0ae..5fb35b098 100644 --- a/packages/diffutils/build.sh +++ b/packages/diffutils/build.sh @@ -10,11 +10,3 @@ TERMUX_PKG_DEPENDS="libiconv" TERMUX_PKG_ESSENTIAL=true TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_path_PR_PROGRAM=${TERMUX_PREFIX}/bin/pr" - -termux_step_pre_configure() { - if $TERMUX_DEBUG; then - # When doing debug build, -D_FORTIFY_SOURCE=2 gives an - # error: use of undeclared identifier '__USE_FORTIFY_LEVEL' - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi -} diff --git a/packages/grep/build.sh b/packages/grep/build.sh index e2cd0be5e..5cd531d6c 100644 --- a/packages/grep/build.sh +++ b/packages/grep/build.sh @@ -7,16 +7,3 @@ TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/grep/grep-${TERMUX_PKG_VERSION} TERMUX_PKG_SHA256=667e15e8afe189e93f9f21a7cd3a7b3f776202f417330b248c2ad4f997d9373e TERMUX_PKG_DEPENDS="libandroid-support, pcre" TERMUX_PKG_ESSENTIAL=true - -termux_step_pre_configure() { - if $TERMUX_DEBUG; then - # When doing debug build, -D_FORTIFY_SOURCE=2 gives this error: - # /home/builder/.termux-build/_cache/19b-aarch64-24-v5/bin/../sysroot/usr/include/bits/fortify/stdio.h:51:53: error: use of undeclared identifier '__USE_FORTIFY_LEVEL' - # return __builtin___vsnprintf_chk(dest, size, 0, __bos(dest), format, ap); - # ^ - # lib/cdefs.h:123:48: note: expanded from macro '__bos' - # #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) - # ^ - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi -} diff --git a/packages/lftp/build.sh b/packages/lftp/build.sh index 42face3f4..a587533c1 100644 --- a/packages/lftp/build.sh +++ b/packages/lftp/build.sh @@ -19,11 +19,5 @@ ac_cv_func_dn_expand=no " termux_step_pre_configure() { - if $TERMUX_DEBUG; then - #When doing debug build, -D_FORTIFY_SOURCE=2 gives this error: - # /home/builder/.termux-build/_lib/16-aarch64-21-v3/bin/../sysroot/usr/include/bits/fortify/string.h:79:26: error: use of undeclared identifier '__USE_FORTIFY_LEVEL' - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi - CXXFLAGS+=" -DNO_INLINE_GETPASS=1" } diff --git a/packages/libgnutls/build.sh b/packages/libgnutls/build.sh index 8985517fa..c540ea90a 100644 --- a/packages/libgnutls/build.sh +++ b/packages/libgnutls/build.sh @@ -23,9 +23,4 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" termux_step_pre_configure() { CFLAGS+=" -DNO_INLINE_GETPASS=1" - if $TERMUX_DEBUG; then - # When doing debug build, -D_FORTIFY_SOURCE=2 gives this error: - # /home/builder/.termux-build/_cache/android-r20-api-24-v2/bin/../sysroot/usr/include/bits/fortify/string.h:157:22: error: use of undeclared identifier '__USE_FORTIFY_LEVEL' - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi } diff --git a/packages/mc/build.sh b/packages/mc/build.sh index b1aa7acfa..50d0a18ff 100644 --- a/packages/mc/build.sh +++ b/packages/mc/build.sh @@ -18,13 +18,3 @@ ac_cv_path_ZIP=$TERMUX_PREFIX/bin/zip --with-ncurses-libs=$TERMUX_PREFIX/lib --with-screen=ncurses " - -termux_step_pre_configure() { - if $TERMUX_DEBUG; then - # Debug build fails with: - # /home/builder/.termux-build/mc/src/src/filemanager/file.c:2019:37: error: 'umask' called with invalid mode - # src_mode = umask (-1); - # ^ - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi -} diff --git a/packages/nano/build.sh b/packages/nano/build.sh index 2f960d45b..efb4d929a 100644 --- a/packages/nano/build.sh +++ b/packages/nano/build.sh @@ -17,11 +17,6 @@ TERMUX_PKG_RM_AFTER_INSTALL="bin/rnano share/man/man1/rnano.1 share/nano/man-htm termux_step_pre_configure() { LDFLAGS+=" -landroid-glob" - if $TERMUX_DEBUG; then - #When doing debug build, -D_FORTIFY_SOURCE=2 gives this error: - # /home/builder/.termux-build/_lib/16-aarch64-21-v3/bin/../sysroot/usr/include/bits/fortify/string.h:79:26: error: use of undeclared identifier '__USE_FORTIFY_LEVEL' - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi } termux_step_post_make_install() { diff --git a/packages/oathtool/build.sh b/packages/oathtool/build.sh index 535c275b1..dd54fe4ab 100644 --- a/packages/oathtool/build.sh +++ b/packages/oathtool/build.sh @@ -9,12 +9,3 @@ TERMUX_PKG_DEPENDS="xmlsec, zlib" TERMUX_PKG_BREAKS="oathtool-dev" TERMUX_PKG_REPLACES="oathtool-dev" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-pam" - -termux_step_pre_configure() { - if $TERMUX_DEBUG; then - # When doing debug build, -D_FORTIFY_SOURCE=2 gives this error: - # /home/builder/.termux-build/oathtool/src/liboath/usersfile.c:482:46: error: 'umask' called with invalid mode - # old_umask = umask (~(S_IRUSR | S_IWUSR)); - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi -} diff --git a/packages/vifm/build.sh b/packages/vifm/build.sh index 2fffe3015..5fcef5767 100644 --- a/packages/vifm/build.sh +++ b/packages/vifm/build.sh @@ -9,10 +9,4 @@ TERMUX_PKG_DEPENDS="ncurses, file" termux_step_pre_configure() { autoreconf -if - if $TERMUX_DEBUG; then - # Debug build fails with: - # /home/builder/.termux-build/vifm/src/src/fops_common.c:745:27: error: 'umask' called with invalid mode - # saved_umask = umask(~0600); - export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} - fi }