aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2015-03-31 10:19:44 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2015-03-31 10:19:44 +0200
commit47a6b116069cff9c71466bde1fd87d0775ec9175 (patch)
treecc6402162b64512db1f82ebbb5c94606f14ee3a8 /configure
parent14f3f0dfb90c74b7e1bc96c4aee74fb88dd7923b (diff)
parentc1205952ab7e3be09cd1a0a9a4d4ee9ddeefe1ea (diff)
downloadcompcert-47a6b116069cff9c71466bde1fd87d0775ec9175.tar.gz
compcert-47a6b116069cff9c71466bde1fd87d0775ec9175.zip
Merge pull request #33 from AbsInt/struct-passing
ABI conformance for passing function arguments and returning function results of struct and union types
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure36
1 files changed, 34 insertions, 2 deletions
diff --git a/configure b/configure
index f9591c0b..53d43832 100755
--- a/configure
+++ b/configure
@@ -79,12 +79,19 @@ done
cchecklink=false
casmruntime=""
asm_supports_cfi=""
+struct_passing=""
+struct_return=""
case "$target" in
powerpc-linux|ppc-linux|powerpc-eabi|ppc-eabi)
arch="powerpc"
model="standard"
abi="eabi"
+ struct_passing="ref-caller"
+ case "$target" in
+ *-linux) struct_return="ref";;
+ *-eabi) struct_return="int1-8";;
+ esac
system="linux"
cc="${toolprefix}gcc"
cprepro="${toolprefix}gcc -U__GNUC__ -E"
@@ -97,6 +104,8 @@ case "$target" in
arch="powerpc"
model="standard"
abi="eabi"
+ struct_passing="ref-caller"
+ struct_return="int1-8"
system="diab"
cc="${toolprefix}dcc"
cprepro="${toolprefix}dcc -E"
@@ -125,6 +134,8 @@ case "$target" in
echo "$usage" 1>&2
exit 2;;
esac
+ struct_passing="ints"
+ struct_return="int1-4"
system="linux"
cc="${toolprefix}gcc"
cprepro="${toolprefix}gcc -U__GNUC__ '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E"
@@ -135,6 +146,8 @@ case "$target" in
arch="ia32"
model="sse2"
abi="standard"
+ struct_passing="ints"
+ struct_return="ref"
system="linux"
cc="${toolprefix}gcc -m32"
cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E"
@@ -145,6 +158,8 @@ case "$target" in
arch="ia32"
model="sse2"
abi="standard"
+ struct_passing="ints"
+ struct_return="int1248" # to check!
system="bsd"
cc="${toolprefix}gcc -m32"
cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E"
@@ -154,7 +169,9 @@ case "$target" in
ia32-macosx)
arch="ia32"
model="sse2"
- abi="standard"
+ abi="macosx"
+ struct_passing="ints"
+ struct_return="int1248"
system="macosx"
cc="${toolprefix}gcc -arch i386"
cprepro="${toolprefix}gcc -arch i386 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' -E"
@@ -170,6 +187,8 @@ case "$target" in
arch="ia32"
model="sse2"
abi="standard"
+ struct_passing="ints"
+ struct_return="ref"
system="cygwin"
cc="${toolprefix}gcc -m32"
cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E"
@@ -326,6 +345,8 @@ cat >> Makefile.config <<EOF
ARCH=$arch
MODEL=$model
ABI=$abi
+STRUCT_PASSING=$struct_passing
+STRUCT_RETURN=$struct_return
SYSTEM=$system
CC=$cc
CPREPRO=$cprepro
@@ -362,9 +383,19 @@ MODEL=
# ABI=standard # for IA32
ABI=
+# Default calling conventions for passing structs and unions by value
+# See options -fstruct-passing=<style> and -fstruct-return=<style>
+# in the CompCert user's manual
+STRUCT_PASSING=ref_callee
+# STRUCT_PASSING=ref_caller
+# STRUCT_PASSING=ints
+STRUCT_RETURN=ref
+# STRUCT_RETURN=int1248
+# STRUCT_RETURN=int1-4
+# STRUCT_RETURN=int1-8
+
# Target operating system and development environment
# Possible choices for PowerPC:
-# SYSTEM=macosx
# SYSTEM=linux
# SYSTEM=diab
# Possible choices for ARM:
@@ -425,6 +456,7 @@ CompCert configuration:
Target architecture........... $arch
Hardware model................ $model
Application binary interface.. $abi
+ Composite passing conventions. arguments: $struct_passing, return values: $struct_return
OS and development env........ $system
C compiler.................... $cc
C preprocessor................ $cprepro