Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
e2f2e70a
Commit
e2f2e70a
authored
Jan 31, 2002
by
Anthony Green
Committed by
Anthony Green
Jan 31, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure changes to enable cross compiling.
From-SVN: r49378
parent
98884b26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
301 additions
and
155 deletions
+301
-155
libffi/ChangeLog
+8
-0
libffi/aclocal.m4
+96
-0
libffi/configure
+187
-145
libffi/configure.in
+10
-10
No files found.
libffi/ChangeLog
View file @
e2f2e70a
2002-01-31 Anthony Green <green@redhat.com>
* configure: Rebuilt.
* configure.in: Replace CHECK_SIZEOF and endian tests with
cross-compiler friendly macros.
* aclocal.m4 (AC_COMPILE_CHECK_SIZEOF, AC_C_BIGENDIAN_CROSS): New
macros.
2002-01-18 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/darwin.S (_ffi_call_AIX): New.
...
...
libffi/aclocal.m4
View file @
e2f2e70a
...
...
@@ -19,6 +19,102 @@ AC_DEFUN([AC_PROG_LIBTOOL],)
AC_SUBST(LIBTOOL)
])
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
[changequote(<<, >>)dnl
dnl The name to #define.
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
dnl The cache variable name.
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
changequote([, ])dnl
AC_MSG_CHECKING(size of $1)
AC_CACHE_VAL(AC_CV_NAME,
[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
AC_TRY_COMPILE([#include "confdefs.h"
#include <sys/types.h>
$2
], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
if test x$AC_CV_NAME != x ; then break; fi
done
])
if test x$AC_CV_NAME = x ; then
AC_MSG_ERROR([cannot determine a size for $1])
fi
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
])
AC_DEFUN([AC_C_BIGENDIAN_CROSS],
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
[ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/param.h>], [
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/param.h>], [
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
if test $ac_cv_c_bigendian = unknown; then
AC_TRY_RUN([main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
long l;
char c[sizeof (long)];
} u;
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
fi])
if test $ac_cv_c_bigendian = unknown; then
AC_MSG_CHECKING(to probe for byte ordering)
[
cat >conftest.c <<EOF
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
int main() { _ascii (); _ebcdic (); return 0; }
EOF
] if test -f conftest.c ; then
if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
if test `grep -l BIGenDianSyS conftest.o` ; then
echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
ac_cv_c_bigendian=yes
fi
if test `grep -l LiTTleEnDian conftest.o` ; then
echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
if test $ac_cv_c_bigendian = yes ; then
ac_cv_c_bigendian=unknown;
else
ac_cv_c_bigendian=no
fi
fi
echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
fi
fi
AC_MSG_RESULT($ac_cv_c_bigendian)
fi
if test $ac_cv_c_bigendian = yes; then
AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
BYTEORDER=4321
else
BYTEORDER=1234
fi
AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
if test $ac_cv_c_bigendian = unknown; then
AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
fi
])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
...
...
libffi/configure
View file @
e2f2e70a
...
...
@@ -2979,33 +2979,33 @@ echo "configure:2979: checking size of short" >&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_short
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
else
for
ac_size
in
4 8 1 2 16 12
;
do
# List sizes in rough order of prevalence.
cat
>
conftest.
$ac_ext
<<
EOF
#line 298
7
"configure"
#line 298
5
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(short));
exit(0);
}
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (short) ==
$ac_size
):;
; return 0; }
EOF
if
{
(
eval echo
configure:299
8:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_short
=
`
cat
conftestval
`
if
{
(
eval echo
configure:299
5:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sizeof_short
=
$ac_size
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_sizeof_short
=
0
fi
rm
-fr
conftest
*
rm
-f
conftest
*
if
test
x
$ac_cv_sizeof_short
!=
x
;
then
break
;
fi
done
fi
if
test
x
$ac_cv_sizeof_short
=
x
;
then
{
echo
"configure: error: cannot determine a size for short"
1>&2
;
exit
1
;
}
fi
echo
"
$ac_t
""
$ac_cv_sizeof_short
"
1>&6
cat
>>
confdefs.h
<<
EOF
...
...
@@ -3018,33 +3018,33 @@ echo "configure:3018: checking size of int" >&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_int
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
else
for
ac_size
in
4 8 1 2 16 12
;
do
# List sizes in rough order of prevalence.
cat
>
conftest.
$ac_ext
<<
EOF
#line 302
6
"configure"
#line 302
4
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(int));
exit(0);
}
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (int) ==
$ac_size
):;
; return 0; }
EOF
if
{
(
eval echo
configure:303
7:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_int
=
`
cat
conftestval
`
if
{
(
eval echo
configure:303
4:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sizeof_int
=
$ac_size
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_sizeof_int
=
0
fi
rm
-fr
conftest
*
rm
-f
conftest
*
if
test
x
$ac_cv_sizeof_int
!=
x
;
then
break
;
fi
done
fi
if
test
x
$ac_cv_sizeof_int
=
x
;
then
{
echo
"configure: error: cannot determine a size for int"
1>&2
;
exit
1
;
}
fi
echo
"
$ac_t
""
$ac_cv_sizeof_int
"
1>&6
cat
>>
confdefs.h
<<
EOF
...
...
@@ -3057,33 +3057,33 @@ echo "configure:3057: checking size of long" >&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_long
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
else
for
ac_size
in
4 8 1 2 16 12
;
do
# List sizes in rough order of prevalence.
cat
>
conftest.
$ac_ext
<<
EOF
#line 306
5
"configure"
#line 306
3
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(long));
exit(0);
}
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (long) ==
$ac_size
):;
; return 0; }
EOF
if
{
(
eval echo
configure:307
6:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_long
=
`
cat
conftestval
`
if
{
(
eval echo
configure:307
3:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sizeof_long
=
$ac_size
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_sizeof_long
=
0
fi
rm
-fr
conftest
*
rm
-f
conftest
*
if
test
x
$ac_cv_sizeof_long
!=
x
;
then
break
;
fi
done
fi
if
test
x
$ac_cv_sizeof_long
=
x
;
then
{
echo
"configure: error: cannot determine a size for long"
1>&2
;
exit
1
;
}
fi
echo
"
$ac_t
""
$ac_cv_sizeof_long
"
1>&6
cat
>>
confdefs.h
<<
EOF
...
...
@@ -3096,33 +3096,33 @@ echo "configure:3096: checking size of long long" >&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_long_long
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
else
for
ac_size
in
4 8 1 2 16 12
;
do
# List sizes in rough order of prevalence.
cat
>
conftest.
$ac_ext
<<
EOF
#line 310
4
"configure"
#line 310
2
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(long long));
exit(0);
}
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (long long) ==
$ac_size
):;
; return 0; }
EOF
if
{
(
eval echo
configure:311
5:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_long_long
=
`
cat
conftestval
`
if
{
(
eval echo
configure:311
2:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sizeof_long_long
=
$ac_size
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_sizeof_long_long
=
0
fi
rm
-fr
conftest
*
rm
-f
conftest
*
if
test
x
$ac_cv_sizeof_long_long
!=
x
;
then
break
;
fi
done
fi
if
test
x
$ac_cv_sizeof_long_long
=
x
;
then
{
echo
"configure: error: cannot determine a size for long long"
1>&2
;
exit
1
;
}
fi
echo
"
$ac_t
""
$ac_cv_sizeof_long_long
"
1>&6
cat
>>
confdefs.h
<<
EOF
...
...
@@ -3135,33 +3135,33 @@ echo "configure:3135: checking size of float" >&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_float
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
else
for
ac_size
in
4 8 1 2 16 12
;
do
# List sizes in rough order of prevalence.
cat
>
conftest.
$ac_ext
<<
EOF
#line 314
3
"configure"
#line 314
1
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(float));
exit(0);
}
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (float) ==
$ac_size
):;
; return 0; }
EOF
if
{
(
eval echo
configure:315
4:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_float
=
`
cat
conftestval
`
if
{
(
eval echo
configure:315
1:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sizeof_float
=
$ac_size
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_sizeof_float
=
0
fi
rm
-fr
conftest
*
rm
-f
conftest
*
if
test
x
$ac_cv_sizeof_float
!=
x
;
then
break
;
fi
done
fi
if
test
x
$ac_cv_sizeof_float
=
x
;
then
{
echo
"configure: error: cannot determine a size for float"
1>&2
;
exit
1
;
}
fi
echo
"
$ac_t
""
$ac_cv_sizeof_float
"
1>&6
cat
>>
confdefs.h
<<
EOF
...
...
@@ -3174,33 +3174,33 @@ echo "configure:3174: checking size of double" >&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_double
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
else
for
ac_size
in
4 8 1 2 16 12
;
do
# List sizes in rough order of prevalence.
cat
>
conftest.
$ac_ext
<<
EOF
#line 318
2
"configure"
#line 318
0
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(double));
exit(0);
}
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (double) ==
$ac_size
):;
; return 0; }
EOF
if
{
(
eval echo
configure:319
3:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_double
=
`
cat
conftestval
`
if
{
(
eval echo
configure:319
0:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sizeof_double
=
$ac_size
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_sizeof_double
=
0
fi
rm
-fr
conftest
*
rm
-f
conftest
*
if
test
x
$ac_cv_sizeof_double
!=
x
;
then
break
;
fi
done
fi
if
test
x
$ac_cv_sizeof_double
=
x
;
then
{
echo
"configure: error: cannot determine a size for double"
1>&2
;
exit
1
;
}
fi
echo
"
$ac_t
""
$ac_cv_sizeof_double
"
1>&6
cat
>>
confdefs.h
<<
EOF
...
...
@@ -3213,33 +3213,33 @@ echo "configure:3213: checking size of long double" >&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_long_double
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
else
for
ac_size
in
4 8 1 2 16 12
;
do
# List sizes in rough order of prevalence.
cat
>
conftest.
$ac_ext
<<
EOF
#line 32
21
"configure"
#line 32
19
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(long double));
exit(0);
}
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (long double) ==
$ac_size
):;
; return 0; }
EOF
if
{
(
eval echo
configure:32
32:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_long_double
=
`
cat
conftestval
`
if
{
(
eval echo
configure:32
29:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sizeof_long_double
=
$ac_size
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_sizeof_long_double
=
0
fi
rm
-fr
conftest
*
rm
-f
conftest
*
if
test
x
$ac_cv_sizeof_long_double
!=
x
;
then
break
;
fi
done
fi
if
test
x
$ac_cv_sizeof_long_double
=
x
;
then
{
echo
"configure: error: cannot determine a size for long double"
1>&2
;
exit
1
;
}
fi
echo
"
$ac_t
""
$ac_cv_sizeof_long_double
"
1>&6
cat
>>
confdefs.h
<<
EOF
...
...
@@ -3253,33 +3253,33 @@ echo "configure:3253: checking size of void *" >&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_void_p
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
else
for
ac_size
in
4 8 1 2 16 12
;
do
# List sizes in rough order of prevalence.
cat
>
conftest.
$ac_ext
<<
EOF
#line 32
61
"configure"
#line 32
59
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(void *));
exit(0);
}
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (void *) ==
$ac_size
):;
; return 0; }
EOF
if
{
(
eval echo
configure:32
72:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_void_p
=
`
cat
conftestval
`
if
{
(
eval echo
configure:32
69:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_sizeof_void_p
=
$ac_size
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_sizeof_void_p
=
0
fi
rm
-fr
conftest
*
rm
-f
conftest
*
if
test
x
$ac_cv_sizeof_void_p
!=
x
;
then
break
;
fi
done
fi
if
test
x
$ac_cv_sizeof_void_p
=
x
;
then
{
echo
"configure: error: cannot determine a size for void *"
1>&2
;
exit
1
;
}
fi
echo
"
$ac_t
""
$ac_cv_sizeof_void_p
"
1>&6
cat
>>
confdefs.h
<<
EOF
...
...
@@ -3338,7 +3338,7 @@ fi
rm
-f
conftest
*
if
test
$ac_cv_c_bigendian
=
unknown
;
then
if
test
"
$cross_compiling
"
=
yes
;
then
{
echo
"configure: error: can not run test program while cross compiling"
1>&2
;
exit
1
;
}
echo
$ac_n
"cross-compiling... "
2>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 3345 "configure"
...
...
@@ -3370,11 +3370,53 @@ fi
fi
echo
"
$ac_t
""
$ac_cv_c_bigendian
"
1>&6
if
test
$ac_cv_c_bigendian
=
unknown
;
then
echo
$ac_n
"checking to probe for byte ordering""...
$ac_c
"
1>&6
echo
"configure:3376: checking to probe for byte ordering"
>
&5
cat
>
conftest.c
<<
EOF
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
int main() { _ascii (); _ebcdic (); return 0; }
EOF
if
test
-f
conftest.c
;
then
if
${
CC
-cc
}
${
CFLAGS
}
conftest.c
-o
conftest.o
&&
test
-f
conftest.o
;
then
if
test
`
grep
-l
BIGenDianSyS conftest.o
`
;
then
echo
$ac_n
' big endian probe OK, '
1>&6
ac_cv_c_bigendian
=
yes
fi
if
test
`
grep
-l
LiTTleEnDian conftest.o
`
;
then
echo
$ac_n
' little endian probe OK, '
1>&6
if
test
$ac_cv_c_bigendian
=
yes
;
then
ac_cv_c_bigendian
=
unknown
;
else
ac_cv_c_bigendian
=
no
fi
fi
echo
$ac_n
'guessing bigendian ... '
>
&6
fi
fi
echo
"
$ac_t
""
$ac_cv_c_bigendian
"
1>&6
fi
if
test
$ac_cv_c_bigendian
=
yes
;
then
cat
>>
confdefs.h
<<
\
EOF
#define WORDS_BIGENDIAN 1
EOF
BYTEORDER
=
4321
else
BYTEORDER
=
1234
fi
cat
>>
confdefs.h
<<
EOF
#define BYTEORDER
$BYTEORDER
EOF
if
test
$ac_cv_c_bigendian
=
unknown
;
then
{
echo
"configure: error: unknown endianess - sorry"
1>&2
;
exit
1
;
}
fi
...
...
libffi/configure.in
View file @
e2f2e70a
...
...
@@ -84,16 +84,16 @@ AC_CHECK_FUNCS(memcpy)
AC_FUNC_ALLOCA
dnl AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(float)
AC_CHECK_SIZEOF(double)
AC_CHECK_SIZEOF(long double)
AC_CHECK_SIZEOF(void *)
AC_C_BIGENDIAN
AC_C
OMPILE_C
HECK_SIZEOF(short)
AC_C
OMPILE_C
HECK_SIZEOF(int)
AC_C
OMPILE_C
HECK_SIZEOF(long)
AC_C
OMPILE_C
HECK_SIZEOF(long long)
AC_C
OMPILE_C
HECK_SIZEOF(float)
AC_C
OMPILE_C
HECK_SIZEOF(double)
AC_C
OMPILE_C
HECK_SIZEOF(long double)
AC_C
OMPILE_C
HECK_SIZEOF(void *)
AC_C_BIGENDIAN
_CROSS
AC_SUBST(TARGET)
AC_SUBST(TARGETDIR)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment