aboutsummaryrefslogtreecommitdiffstats
path: root/xcomp
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
committerErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
commit84adefa331c4159d432d22840663c38f155cd4c1 (patch)
treebff9a9c66adda4df2106dfd0e5c053ab182a12bd /xcomp
downloadotp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz
otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2
otp-84adefa331c4159d432d22840663c38f155cd4c1.zip
The R13B03 release.OTP_R13B03
Diffstat (limited to 'xcomp')
-rw-r--r--xcomp/README.xcomp25
-rw-r--r--xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf196
-rw-r--r--xcomp/erl-xcomp-vxworks_ppc32.conf197
-rw-r--r--xcomp/erl-xcomp.conf.template204
4 files changed, 622 insertions, 0 deletions
diff --git a/xcomp/README.xcomp b/xcomp/README.xcomp
new file mode 100644
index 0000000000..4df9226a96
--- /dev/null
+++ b/xcomp/README.xcomp
@@ -0,0 +1,25 @@
+This directory contains configuration file templates and examples for
+cross compiling Erlang/OTP. The configuration files should be supplied to
+$ERl_TOP/otp_build in the ./otp_build env_cross command to set up an
+appropriate environment for cross compiling.
+
+Copy the template file erl-xcomp.conf.template to an appropriate name
+and fill in at least the mandatory parts before attempting cross
+compilation. See the template file for details on configuration
+parameters and see the example erl-xcomp-TileraMDE2.0-tilepro.conf for
+an example of a working configuration file.
+
+The support for cross compiling is in it's early stage of development,
+it works for cross compiling some gnu/linux systems, but has only been partly
+tested for more esotheric platforms. The vxworks example file is highly
+dependent on our environment and is here more or less for internal use.
+
+Please submit any patches for cross compiling in a way consistent with
+this system. Variables should be added to the configuration file,
+which is sourced both by $ERL_TOP/otp_build and each configure
+script. If a new configuration variable is needed for your system, add
+it to the template file, use it in otp_build and/or configure and
+submit the patch to erlang-patches for further integration into the
+main branch. All input is welcome as we cannot possibly have all cross
+compiling environments out there to test with.
+
diff --git a/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf b/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
new file mode 100644
index 0000000000..e711f06a27
--- /dev/null
+++ b/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
@@ -0,0 +1,196 @@
+###
+### %CopyrightBegin%
+###
+### Copyright Ericsson AB 2009. All Rights Reserved.
+###
+### The contents of this file are subject to the Erlang Public License,
+### Version 1.1, (the "License"); you may not use this file except in
+### compliance with the License. You should have received a copy of the
+### Erlang Public License along with this software. If not, it can be
+### retrieved online at http://www.erlang.org/.
+###
+### Software distributed under the License is distributed on an "AS IS"
+### basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+### the License for the specific language governing rights and limitations
+### under the License.
+###
+### %CopyrightEnd%
+###
+### File: erl-xcomp.conf
+### Author: Rickard Green
+###
+
+### ----------------------------------------------------------------------------
+### When cross compiling Erlang/OTP, copy this file and set the variables
+### needed below. Then pass the path to the copy of this file as an argument
+### to "eval `otp_build env_cross <path to erl-xcomp.conf file>`".
+### ----------------------------------------------------------------------------
+
+### ----------------------------------------------------------------------------
+### Variables in the following section *have* to be set.
+###
+
+##
+## Operating system and hardware architecture.
+##
+# Operating system: linux|solaris<ver>|darwin|freebsd|win32|<...>
+erl_xcomp_os=linux
+# Hardware architecture: x86|x86_64|ultrasparc|sparc64|ppc|arm|tile|<...>
+erl_xcomp_hw=tile
+# Manufacturer: (unknown is ok)
+erl_xcomp_man=tilera
+# Extra target info (unknown is ok)
+erl_xcomp_target_xtra=gnu
+
+# Target (change if default isn't satisfactory)
+erl_xcomp_target=${erl_xcomp_hw}-${erl_xcomp_man}-${erl_xcomp_os}-${erl_xcomp_target_xtra}
+
+##
+## Sizes (in bytes) of some important types.
+##
+# void *
+erl_xcomp_void_p=4
+# short
+erl_xcomp_short=2
+# int
+erl_xcomp_int=4
+# long
+erl_xcomp_long=4
+# long long (use 0 if no 'long long' type exist)
+erl_xcomp_long_long=8
+# size_t
+erl_xcomp_sizeof_size_t=4
+# off_t
+erl_xcomp_sizeof_off_t=4
+
+### ----------------------------------------------------------------------------
+### The variables in the following section have to be set for linux systems
+###
+# linux kernel version (as reported by "uname -r")
+erl_xcomp_linux_kernel=2.6.26.7
+
+### ----------------------------------------------------------------------------
+### ---------------------------------------------------------------------------
+### To override the configure flags for a special target system, You
+### can set this variable which overrides configure parameters on the
+### command line and instead uses the specified options. The variable
+### leaves the build-host system untouched.
+### ---------------------------------------------------------------------------
+erl_xcomp_configure_flags="--without-termcap"
+
+###----------------------------------------------------------------------------
+### You can specify a specific CC or LD for the build target (the cross
+### compiler) here along with magic CFLAGS and/or LDFLAGS if needed
+### ar and ranlib might also be specified if needed.
+###----------------------------------------------------------------------------
+
+erl_xcomp_cc=
+
+erl_xcomp_ld=
+
+erl_xcomp_cflags=
+
+erl_xcomp_cpp=
+
+erl_xcomp_ldflags=
+
+erl_xcomp_ranlib=
+
+erl_xcomp_ar=
+
+###----------------------------------------------------------------------------
+### The ded_ls and ded_ldflags variables control linking of dynamically loaded
+### erlang drivers. On i.e. Linux these are set to
+### $(CC) and "-shared" respectively, but other OS'es might need other
+### programs and flags to build a dynamic library.
+### erl_xcomp_ded_ld_runtime_library_path is the flag to set a
+### specific runtime library path for the shared library at link time,
+### usually this should be left empty.
+###----------------------------------------------------------------------------
+
+erl_xcomp_ded_ld=
+
+erl_xcomp_ded_ldflags=
+
+erl_xcomp_ded_ld_runtime_library_path=
+
+### The variables in the following section does not need to be set. Only
+### set these if you really know what you are doing.
+###
+
+##
+## Big endian/little endian can usually be determined by configure correctly,
+## but if not, set this variable
+##
+erl_xcomp_bigendian=
+
+##
+## If you have a working poll that can be used: yes|no
+##
+erl_xcomp_poll=yes
+
+##
+## If you have a working kqueue() that can be used: yes|no
+##
+erl_xcomp_kqueue=
+
+##
+## If you have a putenv() that stores a copy of the key-value pair: yes|no
+##
+erl_xcomp_putenv_copy=
+
+##
+## If you have reliable floating point exeptions that can be
+## used: yes|no
+##
+erl_xcomp_reliable_fpe=
+
+##
+## If you have getaddrinfo() usable for ipv6: yes|no
+##
+erl_xcomp_getaddrinfo=yes
+
+##
+## If you have a gethrvtime() that works and uses ioctl()
+## to /proc/self: yes|no
+##
+erl_xcomp_gethrvtime_procfs_ioctl=
+
+##
+## If you have a working clock_gettime(): yes|no
+##
+erl_xcomp_clock_gettime=
+
+##
+## If you have a __after_morecore_hook that can track malloc()s
+## core memory use: yes|no
+##
+erl_xcomp_after_morecore_hook=
+
+##
+## If you have brk, sbrk and end symbols: yes|no
+##
+# brk
+erl_xcomp_have_brk=
+# _brk
+erl_xcomp_have__brk=
+# __brk
+erl_xcomp_have___brk=
+# sbrk
+erl_xcomp_have_sbrk=
+# _sbrk
+erl_xcomp_have__sbrk=
+# __sbrk
+erl_xcomp_have___sbrk=
+# end
+erl_xcomp_end=
+# _end
+erl_xcomp__end=
+
+##
+## If sbrk/brk wrappers using dlsym(RTLD_NEXT, _) can track malloc()s
+## core memory use: yes|no
+##
+erl_xcomp_brk_wrappers=
+
+### ----------------------------------------------------------------------------
diff --git a/xcomp/erl-xcomp-vxworks_ppc32.conf b/xcomp/erl-xcomp-vxworks_ppc32.conf
new file mode 100644
index 0000000000..544212233a
--- /dev/null
+++ b/xcomp/erl-xcomp-vxworks_ppc32.conf
@@ -0,0 +1,197 @@
+###
+### %CopyrightBegin%
+###
+### Copyright Ericsson AB 2009. All Rights Reserved.
+###
+### The contents of this file are subject to the Erlang Public License,
+### Version 1.1, (the "License"); you may not use this file except in
+### compliance with the License. You should have received a copy of the
+### Erlang Public License along with this software. If not, it can be
+### retrieved online at http://www.erlang.org/.
+###
+### Software distributed under the License is distributed on an "AS IS"
+### basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+### the License for the specific language governing rights and limitations
+### under the License.
+###
+### %CopyrightEnd%
+###
+### File: erl-xcomp-vxworks_ppc32.conf
+### Author: Rickard Green/Patrik Nyblom
+###
+
+### ----------------------------------------------------------------------------
+### When cross compiling Erlang/OTP, copy this file and set the variables
+### needed below. Then pass the path to the copy of this file as an argument
+### to "eval `otp_build env_cross <path to erl-xcomp.conf file>`".
+### ----------------------------------------------------------------------------
+
+### ----------------------------------------------------------------------------
+### Variables in the following section *have* to be set.
+###
+
+##
+## Operating system and hardware architecture.
+##
+# Operating system: linux|solaris<ver>|darwin|freebsd|win32|<...>
+erl_xcomp_os=vxworks
+# Hardware architecture: x86|x86_64|ultrasparc|sparc64|ppc|arm|tile|<...>
+# Note that this will be the host parameter to configure, so it
+# should be both recognizable by config.sub and a valid prefix for
+# i.e. gcc etc.
+erl_xcomp_hw=ppc-wrs
+# Manufacturer: (unknown is ok)
+erl_xcomp_man=wrs
+# Extra target info (unknown is ok)
+erl_xcomp_target_xtra=unknown
+
+# Target (change if default isn't satisfactory)
+erl_xcomp_target=powerpc-wrs-vxworks
+
+##
+## Sizes (in bytes) of some important types.
+##
+# void *
+erl_xcomp_void_p=4
+# short
+erl_xcomp_short=2
+# int
+erl_xcomp_int=4
+# long
+erl_xcomp_long=4
+# long long (use 0 if no 'long long' type exist)
+erl_xcomp_long_long=8
+# size_t
+erl_xcomp_sizeof_size_t=4
+# off_t
+erl_xcomp_sizeof_off_t=4
+
+### ----------------------------------------------------------------------------
+### The variables in the following section have to be set for linux systems
+###
+# linux kernel version (as reported by "uname -r")
+erl_xcomp_linux_kernel=
+
+### ----------------------------------------------------------------------------
+### ---------------------------------------------------------------------------
+### To override the configure flags for a special target system, You
+### can set this variable which overrides configure parameters on the
+### command line and instead uses the specified options. The variable
+### leaves the build-host system untouched.
+### ---------------------------------------------------------------------------
+erl_xcomp_configure_flags="--without-termcap"
+
+###----------------------------------------------------------------------------
+### You can specify a specific CC or LD for the build target (the cross
+### compiler) here along with magic CFLAGS and/or LDFLAGS if needed
+###----------------------------------------------------------------------------
+
+erl_xcomp_cc="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/ccppc"
+
+erl_xcomp_ld="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/ldppc"
+
+erl_xcomp_cflags="-DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -DWANT_NONBLOCKING -DHAVE_SENS -DHAVE_MEMMOVE -DVXWORKS -I$WIND_BASE/vxworks-6.3/target/h -I$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/lib/gcc/powerpc-wrs-vxworks/3.4.4/include -I$WIND_BASE/vxworks-6.3/target/h/wrn/coreip -I$WIND_BASE/vxworks-6.3/target/h -mstrict-align -fvolatile -fno-builtin -mlongcall"
+
+erl_xcomp_cpp="$erl_xcomp_cc $erl_xcomp_cflags -E"
+
+erl_xcomp_ldflags="-mlongcall"
+
+erl_xcomp_ranlib="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/ranlibppc"
+erl_xcomp_ar="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/arppc"
+
+###----------------------------------------------------------------------------
+### The ded_ls and ded_ldflags variables control linking of dynamically loaded
+### erlang drivers. On i.e. Linux these are set to
+### $(CC) and "-shared" respectively, but other OS'es might need other
+### programs and flags to build a dynamic library.
+### erl_xcomp_ded_ld_runtime_library_path is the flag to set a
+### specific runtime library path for the shared library at link time,
+### usually this should be left empty.
+###----------------------------------------------------------------------------
+
+erl_xcomp_ded_ld=
+
+erl_xcomp_ded_ldflags=
+
+erl_xcomp_ded_ld_runtime_library_path=
+
+### The variables in the following section does not need to be set. Only
+### set these if you really know what you are doing.
+###
+
+##
+## Big endian/little endian can usually be determined by configure correctly,
+## but if not, set this variable
+##
+erl_xcomp_bigendian=yes
+
+##
+## If you have a working poll that can be used: yes|no
+##
+erl_xcomp_poll=
+
+##
+## If you have a working kqueue() that can be used: yes|no
+##
+erl_xcomp_kqueue=
+
+##
+## If you have a putenv() that stores a copy of the key-value pair: yes|no
+##
+erl_xcomp_putenv_copy=
+
+##
+## If you have reliable floating point exeptions that can be
+## used: yes|no
+##
+erl_xcomp_reliable_fpe=
+
+##
+## If you have getaddrinfo() usable for ipv6: yes|no
+##
+erl_xcomp_getaddrinfo=
+
+##
+## If you have a gethrvtime() that works and uses ioctl()
+## to /proc/self: yes|no
+##
+erl_xcomp_gethrvtime_procfs_ioctl=
+
+##
+## If you have a working clock_gettime(): yes|no
+##
+erl_xcomp_clock_gettime=
+
+##
+## If you have a __after_morecore_hook that can track malloc()s
+## core memory use: yes|no
+##
+erl_xcomp_after_morecore_hook=
+
+##
+## If you have brk, sbrk and end symbols: yes|no
+##
+# brk
+erl_xcomp_have_brk=
+# _brk
+erl_xcomp_have__brk=
+# __brk
+erl_xcomp_have___brk=
+# sbrk
+erl_xcomp_have_sbrk=
+# _sbrk
+erl_xcomp_have__sbrk=
+# __sbrk
+erl_xcomp_have___sbrk=
+# end
+erl_xcomp_end=
+# _end
+erl_xcomp__end=
+
+##
+## If sbrk/brk wrappers using dlsym(RTLD_NEXT, _) can track malloc()s
+## core memory use: yes|no
+##
+erl_xcomp_brk_wrappers=
+
+### ----------------------------------------------------------------------------
diff --git a/xcomp/erl-xcomp.conf.template b/xcomp/erl-xcomp.conf.template
new file mode 100644
index 0000000000..cc604a80e5
--- /dev/null
+++ b/xcomp/erl-xcomp.conf.template
@@ -0,0 +1,204 @@
+###
+### %CopyrightBegin%
+###
+### Copyright Ericsson AB 2009. All Rights Reserved.
+###
+### The contents of this file are subject to the Erlang Public License,
+### Version 1.1, (the "License"); you may not use this file except in
+### compliance with the License. You should have received a copy of the
+### Erlang Public License along with this software. If not, it can be
+### retrieved online at http://www.erlang.org/.
+###
+### Software distributed under the License is distributed on an "AS IS"
+### basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+### the License for the specific language governing rights and limitations
+### under the License.
+###
+### %CopyrightEnd%
+###
+### File: erl-xcomp.conf
+### Author: Rickard Green
+###
+
+### ----------------------------------------------------------------------------
+### When cross compiling Erlang/OTP, copy this file and set the variables
+### needed below. Then pass the path to the copy of this file as an argument
+### to "eval `otp_build env_cross <absolute path to erl-xcomp.conf file>`".
+### ----------------------------------------------------------------------------
+
+### ----------------------------------------------------------------------------
+### Variables in the following section *have* to be set.
+###
+
+##
+## Operating system and hardware architecture.
+##
+# Operating system: linux|solaris<ver>|darwin|freebsd|win32|<...>
+erl_xcomp_os=
+# Hardware architecture: x86|x86_64|ultrasparc|sparc64|ppc|arm|tile|<...>
+# Note that this will be the host parameter to configure, so it
+# should be both recognizable by config.sub and a valid prefix for
+# i.e. gcc etc if compiler is not specified further down.
+erl_xcomp_hw=
+# Manufacturer: (unknown is ok)
+erl_xcomp_man=
+# Extra target info (unknown is ok)
+erl_xcomp_target_xtra=
+
+# Target (change if default isn't satisfactory)
+# Note that this has to correspond to what config.sub thinks the machine is.
+# Edit config.sub if not satisfactory, or set this explicitly
+# to what output you will get from running
+# $ERL_TOP/erts/autoconf/config.sub $erl_xcomp_hw
+
+erl_xcomp_target=${erl_xcomp_hw}-${erl_xcomp_man}-${erl_xcomp_os}-${erl_xcomp_target_xtra}
+
+##
+## Sizes (in bytes) of some important types.
+##
+# void *
+erl_xcomp_void_p=
+# short
+erl_xcomp_short=
+# int
+erl_xcomp_int=
+# long
+erl_xcomp_long=
+# long long (use 0 if no 'long long' type exist)
+erl_xcomp_long_long=
+# size_t
+erl_xcomp_sizeof_size_t=
+# off_t
+erl_xcomp_sizeof_off_t=
+
+### ----------------------------------------------------------------------------
+### The variables in the following section have to be set for linux systems
+###
+# linux kernel version (as reported by "uname -r")
+erl_xcomp_linux_kernel=
+
+### ----------------------------------------------------------------------------
+### ---------------------------------------------------------------------------
+### To override the configure flags for a special target system, You
+### can set this variable which overrides configure parameters on the
+### command line and instead uses the specified options. The variable
+### leaves the build-host system untouched.
+### ---------------------------------------------------------------------------
+erl_xcomp_configure_flags=
+
+###----------------------------------------------------------------------------
+### You can specify a specific CC or LD for the build target (the cross
+### compiler) here along with magic CFLAGS and/or LDFLAGS if needed
+### ar and ranlib might also be specified if needed.
+###----------------------------------------------------------------------------
+
+erl_xcomp_cc=
+
+erl_xcomp_ld=
+
+erl_xcomp_cflags=
+
+erl_xcomp_cpp=
+
+erl_xcomp_ldflags=
+
+erl_xcomp_ranlib=
+
+erl_xcomp_ar=
+
+###----------------------------------------------------------------------------
+### The ded_ls and ded_ldflags variables control linking of dynamically loaded
+### erlang drivers. On i.e. Linux these are set to
+### $(CC) and "-shared" respectively, but other OS'es might need other
+### programs and flags to build a dynamic library.
+### erl_xcomp_ded_ld_runtime_library_path is the flag to set a
+### specific runtime library path for the shared library at link time,
+### usually this should be left empty.
+###----------------------------------------------------------------------------
+
+erl_xcomp_ded_ld=
+
+erl_xcomp_ded_ldflags=
+
+erl_xcomp_ded_ld_runtime_library_path=
+
+### The variables in the following section does not need to be set. Only
+### set these if you really know what you are doing.
+###
+
+##
+## Big endian/little endian can usually be determined by configure correctly,
+## but if not, set this variable
+##
+erl_xcomp_bigendian=
+
+##
+## If you have a working poll that can be used: yes|no
+##
+erl_xcomp_poll=
+
+##
+## If you have a working kqueue() that can be used: yes|no
+##
+erl_xcomp_kqueue=
+
+##
+## If you have a putenv() that stores a copy of the key-value pair: yes|no
+##
+erl_xcomp_putenv_copy=
+
+##
+## If you have reliable floating point exeptions that can be
+## used: yes|no
+##
+erl_xcomp_reliable_fpe=
+
+##
+## If you have getaddrinfo() usable for ipv6: yes|no
+##
+erl_xcomp_getaddrinfo=
+
+##
+## If you have a gethrvtime() that works and uses ioctl()
+## to /proc/self: yes|no
+##
+erl_xcomp_gethrvtime_procfs_ioctl=
+
+##
+## If you have a working clock_gettime(): yes|no
+##
+erl_xcomp_clock_gettime=
+
+##
+## If you have a __after_morecore_hook that can track malloc()s
+## core memory use: yes|no
+##
+erl_xcomp_after_morecore_hook=
+
+##
+## If you have brk, sbrk and end symbols: yes|no
+##
+# brk
+erl_xcomp_have_brk=
+# _brk
+erl_xcomp_have__brk=
+# __brk
+erl_xcomp_have___brk=
+# sbrk
+erl_xcomp_have_sbrk=
+# _sbrk
+erl_xcomp_have__sbrk=
+# __sbrk
+erl_xcomp_have___sbrk=
+# end
+erl_xcomp_end=
+# _end
+erl_xcomp__end=
+
+##
+## If sbrk/brk wrappers using dlsym(RTLD_NEXT, _) can track malloc()s
+## core memory use: yes|no
+##
+erl_xcomp_brk_wrappers=
+
+### ----------------------------------------------------------------------------