1 # |
1 # |
2 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # |
4 # |
5 # This code is free software; you can redistribute it and/or modify it |
5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as |
6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. Oracle designates this |
7 # published by the Free Software Foundation. Oracle designates this |
781 else |
781 else |
782 AC_MSG_RESULT([$BUILD_DEVKIT_ROOT]) |
782 AC_MSG_RESULT([$BUILD_DEVKIT_ROOT]) |
783 fi |
783 fi |
784 |
784 |
785 BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT" |
785 BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT" |
786 FLAGS_SETUP_SYSROOT_FLAGS([BUILD_]) |
|
787 |
786 |
788 # Fallback default of just /bin if DEVKIT_PATH is not defined |
787 # Fallback default of just /bin if DEVKIT_PATH is not defined |
789 if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then |
788 if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then |
790 BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin" |
789 BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin" |
791 fi |
790 fi |
874 |
869 |
875 if test "x$TOOLCHAIN_TYPE" = xgcc; then |
870 if test "x$TOOLCHAIN_TYPE" = xgcc; then |
876 # If this is a --hash-style=gnu system, use --hash-style=both, why? |
871 # If this is a --hash-style=gnu system, use --hash-style=both, why? |
877 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` |
872 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` |
878 # This is later checked when setting flags. |
873 # This is later checked when setting flags. |
879 |
|
880 # "-Og" suppported for GCC 4.8 and later |
|
881 CFLAG_OPTIMIZE_DEBUG_FLAG="-Og" |
|
882 FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG], |
|
883 IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true], |
|
884 IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false]) |
|
885 |
|
886 # "-z relro" supported in GNU binutils 2.17 and later |
|
887 LINKER_RELRO_FLAG="-Wl,-z,relro" |
|
888 FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG], |
|
889 IF_TRUE: [HAS_LINKER_RELRO=true], |
|
890 IF_FALSE: [HAS_LINKER_RELRO=false]) |
|
891 |
|
892 # "-z now" supported in GNU binutils 2.11 and later |
|
893 LINKER_NOW_FLAG="-Wl,-z,now" |
|
894 FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG], |
|
895 IF_TRUE: [HAS_LINKER_NOW=true], |
|
896 IF_FALSE: [HAS_LINKER_NOW=false]) |
|
897 fi |
874 fi |
898 |
875 |
899 # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed |
876 # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed |
900 # in executable.' |
877 # in executable.' |
901 USING_BROKEN_SUSE_LD=no |
878 USING_BROKEN_SUSE_LD=no |