diff options
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch')
-rw-r--r-- | recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch | 140 |
1 files changed, 0 insertions, 140 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch b/recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch deleted file mode 100644 index 91d258d..0000000 --- a/recipes-core/openjdk/patches-openjdk-8/openjdk8-find-compiler-fix-env-respect.patch +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | --- common/autoconf/toolchain.m4.orig | ||
2 | +++ common/autoconf/toolchain.m4 | ||
3 | @@ -77,7 +77,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSI | ||
4 | # $2 = human readable name of compiler (C or C++) | ||
5 | AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION], | ||
6 | [ | ||
7 | - COMPILER=[$]$1 | ||
8 | + COMPILER="[$]$1" | ||
9 | COMPILER_NAME=$2 | ||
10 | |||
11 | if test "x$OPENJDK_TARGET_OS" = xsolaris; then | ||
12 | @@ -174,64 +174,37 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER], | ||
13 | [ | ||
14 | COMPILER_NAME=$2 | ||
15 | |||
16 | - $1= | ||
17 | + FOUND_$1= | ||
18 | + | ||
19 | + if test "x[$]$1" != "x"; then | ||
20 | + FOUND_$1="[$]$1" | ||
21 | + fi | ||
22 | + | ||
23 | # If TOOLS_DIR is set, check for all compiler names in there first | ||
24 | # before checking the rest of the PATH. | ||
25 | - if test -n "$TOOLS_DIR"; then | ||
26 | + if test "x[$]FOUND_$1" = x -a -n "$TOOLS_DIR"; then | ||
27 | PATH_save="$PATH" | ||
28 | PATH="$TOOLS_DIR" | ||
29 | AC_PATH_PROGS(TOOLS_DIR_$1, $3) | ||
30 | - $1=$TOOLS_DIR_$1 | ||
31 | + FOUND_$1=$TOOLS_DIR_$1 | ||
32 | PATH="$PATH_save" | ||
33 | fi | ||
34 | |||
35 | # AC_PATH_PROGS can't be run multiple times with the same variable, | ||
36 | # so create a new name for this run. | ||
37 | - if test "x[$]$1" = x; then | ||
38 | + if test "x[$]FOUND_$1" = x; then | ||
39 | AC_PATH_PROGS(POTENTIAL_$1, $3) | ||
40 | - $1=$POTENTIAL_$1 | ||
41 | + FOUND_$1=$POTENTIAL_$1 | ||
42 | fi | ||
43 | |||
44 | - if test "x[$]$1" = x; then | ||
45 | + if test "x[$]FOUND_$1" = x; then | ||
46 | HELP_MSG_MISSING_DEPENDENCY([devkit]) | ||
47 | AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG]) | ||
48 | fi | ||
49 | - BASIC_FIXUP_EXECUTABLE($1) | ||
50 | - TEST_COMPILER="[$]$1" | ||
51 | - # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links | ||
52 | - # to 'xlc' but it is crucial that we invoke the compiler with the right name! | ||
53 | - if test "x$OPENJDK_BUILD_OS" != xaix; then | ||
54 | - AC_MSG_CHECKING([resolved symbolic links for $1]) | ||
55 | - BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER) | ||
56 | - AC_MSG_RESULT([$TEST_COMPILER]) | ||
57 | - fi | ||
58 | - AC_MSG_CHECKING([if $1 is disguised ccache]) | ||
59 | - | ||
60 | - COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` | ||
61 | - if test "x$COMPILER_BASENAME" = "xccache"; then | ||
62 | - AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler]) | ||
63 | - # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. | ||
64 | - # We want to control ccache invocation ourselves, so ignore this cc and try | ||
65 | - # searching again. | ||
66 | - | ||
67 | - # Remove the path to the fake ccache cc from the PATH | ||
68 | - RETRY_COMPILER_SAVED_PATH="$PATH" | ||
69 | - COMPILER_DIRNAME=`$DIRNAME [$]$1` | ||
70 | - PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" | ||
71 | - | ||
72 | - # Try again looking for our compiler | ||
73 | - AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3) | ||
74 | - BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1) | ||
75 | - PATH="$RETRY_COMPILER_SAVED_PATH" | ||
76 | - | ||
77 | - AC_MSG_CHECKING([for resolved symbolic links for $1]) | ||
78 | - BASIC_REMOVE_SYMBOLIC_LINKS(PROPER_COMPILER_$1) | ||
79 | - AC_MSG_RESULT([$PROPER_COMPILER_$1]) | ||
80 | - $1="$PROPER_COMPILER_$1" | ||
81 | - else | ||
82 | - AC_MSG_RESULT([no, keeping $1]) | ||
83 | - $1="$TEST_COMPILER" | ||
84 | - fi | ||
85 | + BASIC_FIXUP_EXECUTABLE(FOUND_$1) | ||
86 | + TEST_COMPILER="[$]FOUND_$1" | ||
87 | + | ||
88 | + $1="$TEST_COMPILER" | ||
89 | TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) | ||
90 | ]) | ||
91 | |||
92 | @@ -265,12 +238,12 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS], | ||
93 | # otherwise we might pick up cross-compilers which don't use standard naming. | ||
94 | # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have | ||
95 | # to wait until they are properly discovered. | ||
96 | - AC_PATH_PROGS(BUILD_CC, [cl cc gcc]) | ||
97 | - BASIC_FIXUP_EXECUTABLE(BUILD_CC) | ||
98 | - AC_PATH_PROGS(BUILD_CXX, [cl CC g++]) | ||
99 | - BASIC_FIXUP_EXECUTABLE(BUILD_CXX) | ||
100 | - AC_PATH_PROG(BUILD_LD, ld) | ||
101 | - BASIC_FIXUP_EXECUTABLE(BUILD_LD) | ||
102 | + AS_IF([test "x${BUILD_CC}" = "x"], [AC_PATH_PROGS(BUILD_CC, [cl cc gcc]) | ||
103 | + BASIC_FIXUP_EXECUTABLE(BUILD_CC)]) | ||
104 | + AS_IF([test "x${BUILD_CXX}" = "x"], [AC_PATH_PROGS(BUILD_CXX, [cl CC g++]) | ||
105 | + BASIC_FIXUP_EXECUTABLE(BUILD_CXX)]) | ||
106 | + AS_IF([test "x${BUILD_LD}" = "x"], [AC_PATH_PROG(BUILD_LD, ld) | ||
107 | + BASIC_FIXUP_EXECUTABLE(BUILD_LD)]) | ||
108 | fi | ||
109 | AC_SUBST(BUILD_CC) | ||
110 | AC_SUBST(BUILD_CXX) | ||
111 | --- common/autoconf/basics.m4.orig | ||
112 | +++ common/autoconf/basics.m4 | ||
113 | @@ -171,8 +171,15 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS], | ||
114 | fi | ||
115 | fi | ||
116 | |||
117 | + # First separate the path from the arguments. This will split at the first | ||
118 | + # space. | ||
119 | + complete="[$]$1" | ||
120 | + path="${complete%% *}" | ||
121 | + tmp="$complete EOL" | ||
122 | + arguments="${tmp#* }" | ||
123 | + | ||
124 | if test "x$READLINK" != x; then | ||
125 | - $1=`$READLINK -f [$]$1` | ||
126 | + new_path=`$READLINK -f $path` | ||
127 | else | ||
128 | # Save the current directory for restoring afterwards | ||
129 | STARTDIR=$PWD | ||
130 | @@ -198,8 +205,9 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS], | ||
131 | let COUNTER=COUNTER+1 | ||
132 | done | ||
133 | cd $STARTDIR | ||
134 | - $1=$sym_link_dir/$sym_link_file | ||
135 | + new_path=$sym_link_dir/$sym_link_file | ||
136 | fi | ||
137 | + $1="$new_path ${arguments% *}" | ||
138 | fi | ||
139 | ]) | ||
140 | |||