mksh: fix build on mipsel platforms
And possibly other platforms where this assertion fails: error: variably modified 'ari_sign_32_bit_and_wrap' at file scope Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/packages@34632 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
bb7b3c0322
commit
32c1ef0e63
@ -55,7 +55,7 @@ define Build/Compile
|
|||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
TARGET_OS="$(shell uname -s)" \
|
TARGET_OS="$(shell uname -s)" \
|
||||||
CFLAGS="$(TARGET_CFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
CPPFLAGS="-DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=0" \
|
CPPFLAGS="-DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=0 -DMKSH_GCC565048=1" \
|
||||||
HAVE_CAN_FSTACKPROTECTORALL=0 \
|
HAVE_CAN_FSTACKPROTECTORALL=0 \
|
||||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||||
$(BASH) Build.sh -Q -r -c lto
|
$(BASH) Build.sh -Q -r -c lto
|
||||||
|
18
utils/mksh/patches/000-debian_build_fix.patch
Normal file
18
utils/mksh/patches/000-debian_build_fix.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
This patch is a backport of the fix proposed at:
|
||||||
|
https://bugs.launchpad.net/ubuntu/+source/mksh/+bug/1058035
|
||||||
|
|
||||||
|
diff -urN mksh/Build.sh mksh.new/Build.sh
|
||||||
|
--- mksh/Build.sh 2012-12-11 14:28:56.632807230 +0100
|
||||||
|
+++ mksh.new/Build.sh 2012-12-11 14:35:23.704817141 +0100
|
||||||
|
@@ -1530,9 +1530,11 @@
|
||||||
|
/* but the next three are; we REQUIRE signed integer wraparound */
|
||||||
|
cta(ari_is_signed, (mksh_ari_t)-1 < (mksh_ari_t)0);
|
||||||
|
cta(ari_has_31_bit, 0 < (mksh_ari_t)(((((mksh_ari_t)1 << 15) << 15) - 1) * 2 + 1));
|
||||||
|
+#if !defined(MKSH_GCC565048)
|
||||||
|
cta(ari_sign_32_bit_and_wrap,
|
||||||
|
(mksh_ari_t)(((((mksh_ari_t)1 << 15) << 15) - 1) * 2 + 1) >
|
||||||
|
(mksh_ari_t)(((((mksh_ari_t)1 << 15) << 15) - 1) * 2 + 2));
|
||||||
|
+#endif
|
||||||
|
/* the next assertion is probably not really needed */
|
||||||
|
cta(uari_is_4_char, sizeof(mksh_uari_t) == 4);
|
||||||
|
/* but the next four are; we REQUIRE unsigned integer wraparound */
|
Loading…
x
Reference in New Issue
Block a user