Fixup for Riccardo's sparc systems.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37954 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2014-06-20 08:59:35 +00:00
parent 14cba490b3
commit 961a1d3884
3 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2014-06-20 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Temporarily add -O0 to turn off optimisation while
checking for the need for shorts to be word-aligned ... should fix
the case where the optimiser breaks the test by 'correcting' the
misaligned access.
* configure: regenerate
2014-06-19 Riccardo Mottola <rm@gnu.org>
* Source/common.h

3
configure vendored
View file

@ -21233,6 +21233,8 @@ done
#--------------------------------------------------------------------
# Check if short and int values need to be word aligned
#--------------------------------------------------------------------
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -O0"
{ $as_echo "$as_me:$LINENO: checking short/int needs to be word aligned" >&5
$as_echo_n "checking short/int needs to be word aligned... " >&6; }
if test "$cross_compiling" = yes; then
@ -21282,6 +21284,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
fi
CFLAGS="$saved_CFLAGS"
cat >>confdefs.h <<_ACEOF
#define NEED_WORD_ALIGNMENT $NEED_WORD_ALIGNMENT

View file

@ -2443,11 +2443,14 @@ AC_CHECK_HEADERS(wchar.h)
#--------------------------------------------------------------------
# Check if short and int values need to be word aligned
#--------------------------------------------------------------------
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -O0"
AC_MSG_CHECKING(short/int needs to be word aligned)
AC_TRY_RUN([#include "$srcdir/config/config.align.c"],
NEED_WORD_ALIGNMENT=0,
NEED_WORD_ALIGNMENT=1,
NEED_WORD_ALIGNMENT="$cross_NEED_WORD_ALIGNMENT")
CFLAGS="$saved_CFLAGS"
AC_DEFINE_UNQUOTED(NEED_WORD_ALIGNMENT, $NEED_WORD_ALIGNMENT,
[Define if your system needs to have short/int word aligned])
if test $NEED_WORD_ALIGNMENT = 1; then