mirror of
https://github.com/tpoechtrager/osxcross.git
synced 2024-09-11 16:55:34 +03:00
fix building GCC on FreeBSD
add missing float.h intrinsic header (FreeBSD)
This commit is contained in:
parent
78d78d4276
commit
995ad1d4ab
4
build.sh
4
build.sh
@ -225,6 +225,7 @@ pushd $SDK_DIR/MacOSX$SDK_VERSION.sdk &>/dev/null
|
||||
set +e
|
||||
ln -s $SDK_DIR/MacOSX$SDK_VERSION.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/std*.h usr/include 2>/dev/null
|
||||
$BASE_DIR/oclang/find_intrinsic_headers.sh $SDK_DIR/MacOSX$SDK_VERSION.sdk
|
||||
test ! -f "usr/include/float.h" && cp -f $BASE_DIR/oclang/quirks/float.h usr/include
|
||||
set -e
|
||||
popd &>/dev/null
|
||||
|
||||
@ -297,7 +298,8 @@ echo ""
|
||||
echo "BDIR=\`readlink -f \\\`dirname \$0\\\`\`" >> $OSXCROSS_ENV
|
||||
echo "" >> $OSXCROSS_ENV
|
||||
echo "echo \"export PATH=\$PATH:\$BDIR\"" >> $OSXCROSS_ENV
|
||||
echo "echo \"export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$BDIR/../lib${LIB_PATH}"\" >> $OSXCROSS_ENV
|
||||
echo "echo \"export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$BDIR/../lib${LIB_PATH}\"" >> $OSXCROSS_ENV
|
||||
|
||||
|
||||
chmod +x $OSXCROSS_CONF $OSXCROSS_ENV
|
||||
|
||||
|
@ -51,7 +51,7 @@ pushd build &>/dev/null
|
||||
|
||||
if [ "`uname -s`" == "FreeBSD" ]; then
|
||||
export CPATH="/usr/local/include"
|
||||
export LIBRARY_PATH="/usr/local/lib"
|
||||
export LDFLAGS="-L/usr/local/lib $LDFLAGS"
|
||||
MAKE=gmake
|
||||
IS_FREEBSD=1
|
||||
else
|
||||
@ -74,10 +74,6 @@ require $MAKE
|
||||
--enable-checking=release \
|
||||
--prefix=$OSXCROSS_TARGET_DIR
|
||||
|
||||
if [ $IS_FREEBSD -eq 1 ]; then
|
||||
export LIBRARY_PATH=""
|
||||
fi
|
||||
|
||||
$MAKE -j$JOBS
|
||||
$MAKE install -j$JOBS
|
||||
|
||||
|
124
oclang/quirks/float.h
Normal file
124
oclang/quirks/float.h
Normal file
@ -0,0 +1,124 @@
|
||||
/*===---- float.h - Characteristics of floating point types ----------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __FLOAT_H
|
||||
#define __FLOAT_H
|
||||
|
||||
/* If we're on MinGW, fall back to the system's float.h, which might have
|
||||
* additional definitions provided for Windows.
|
||||
* For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
|
||||
*/
|
||||
#if (defined(__MINGW32__) || defined(_MSC_VER)) && \
|
||||
defined(__has_include_next) && __has_include_next(<float.h>)
|
||||
# include_next <float.h>
|
||||
|
||||
/* Undefine anything that we'll be redefining below. */
|
||||
# undef FLT_EVAL_METHOD
|
||||
# undef FLT_ROUNDS
|
||||
# undef FLT_RADIX
|
||||
# undef FLT_MANT_DIG
|
||||
# undef DBL_MANT_DIG
|
||||
# undef LDBL_MANT_DIG
|
||||
# undef DECIMAL_DIG
|
||||
# undef FLT_DIG
|
||||
# undef DBL_DIG
|
||||
# undef LDBL_DIG
|
||||
# undef FLT_MIN_EXP
|
||||
# undef DBL_MIN_EXP
|
||||
# undef LDBL_MIN_EXP
|
||||
# undef FLT_MIN_10_EXP
|
||||
# undef DBL_MIN_10_EXP
|
||||
# undef LDBL_MIN_10_EXP
|
||||
# undef FLT_MAX_EXP
|
||||
# undef DBL_MAX_EXP
|
||||
# undef LDBL_MAX_EXP
|
||||
# undef FLT_MAX_10_EXP
|
||||
# undef DBL_MAX_10_EXP
|
||||
# undef LDBL_MAX_10_EXP
|
||||
# undef FLT_MAX
|
||||
# undef DBL_MAX
|
||||
# undef LDBL_MAX
|
||||
# undef FLT_EPSILON
|
||||
# undef DBL_EPSILON
|
||||
# undef LDBL_EPSILON
|
||||
# undef FLT_MIN
|
||||
# undef DBL_MIN
|
||||
# undef LDBL_MIN
|
||||
# if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
|
||||
# undef FLT_TRUE_MIN
|
||||
# undef DBL_TRUE_MIN
|
||||
# undef LDBL_TRUE_MIN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Characteristics of floating point types, C99 5.2.4.2.2 */
|
||||
|
||||
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
|
||||
#define FLT_ROUNDS (__builtin_flt_rounds())
|
||||
#define FLT_RADIX __FLT_RADIX__
|
||||
|
||||
#define FLT_MANT_DIG __FLT_MANT_DIG__
|
||||
#define DBL_MANT_DIG __DBL_MANT_DIG__
|
||||
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
|
||||
|
||||
#define DECIMAL_DIG __DECIMAL_DIG__
|
||||
|
||||
#define FLT_DIG __FLT_DIG__
|
||||
#define DBL_DIG __DBL_DIG__
|
||||
#define LDBL_DIG __LDBL_DIG__
|
||||
|
||||
#define FLT_MIN_EXP __FLT_MIN_EXP__
|
||||
#define DBL_MIN_EXP __DBL_MIN_EXP__
|
||||
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
|
||||
|
||||
#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
|
||||
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
|
||||
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
|
||||
|
||||
#define FLT_MAX_EXP __FLT_MAX_EXP__
|
||||
#define DBL_MAX_EXP __DBL_MAX_EXP__
|
||||
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
|
||||
|
||||
#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
|
||||
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
|
||||
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
|
||||
|
||||
#define FLT_MAX __FLT_MAX__
|
||||
#define DBL_MAX __DBL_MAX__
|
||||
#define LDBL_MAX __LDBL_MAX__
|
||||
|
||||
#define FLT_EPSILON __FLT_EPSILON__
|
||||
#define DBL_EPSILON __DBL_EPSILON__
|
||||
#define LDBL_EPSILON __LDBL_EPSILON__
|
||||
|
||||
#define FLT_MIN __FLT_MIN__
|
||||
#define DBL_MIN __DBL_MIN__
|
||||
#define LDBL_MIN __LDBL_MIN__
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
|
||||
# define FLT_TRUE_MIN __FLT_DENORM_MIN__
|
||||
# define DBL_TRUE_MIN __DBL_DENORM_MIN__
|
||||
# define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
|
||||
#endif
|
||||
|
||||
#endif /* __FLOAT_H */
|
Loading…
Reference in New Issue
Block a user