scripts: remove . from $PATH
Add CT_SanitizePath function which removes entries referring to ., /tmp
and non-existing directories from $PATH, and call it early in the
build script.
If . is in PATH, gcc-4.4.4 build breaks:
[ALL ] checking what assembler to use...
/tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as
...
[ALL ] config.status: creating as
i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler,
but config.status creates a local "as" script which is calling the
host assembler.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
[Yann E. MORIN: style fixes + explanations]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 20dd8cef1c8adff0aa3e78ae6d7acfbc45ed5a83)
5 select CC_SUPPORT_FORTRAN
9 select CC_SUPPORT_OBJCXX
11 gcc is the full-blown GNU compiler. This is what most people will choose.
13 gcc supports many languages, a powerful code parser, optimised binary
14 output, and lots of other features.
19 # Don't remove next line
20 # CT_INSERT_VERSION_BELOW
24 prompt "4.5.0 (EXPERIMENTAL)"
25 depends on EXPERIMENTAL
26 select CC_GCC_4_5_or_later
31 select CC_GCC_4_4_or_later
36 select CC_GCC_4_4_or_later
41 select CC_GCC_4_4_or_later
46 select CC_GCC_4_4_or_later
51 select CC_GCC_4_3_or_later
56 select CC_GCC_4_3_or_later
61 select CC_GCC_4_3_or_later
66 select CC_GCC_4_3_or_later
71 select CC_GCC_4_2_or_later
75 prompt "4.2.3 (OBSOLETE)"
76 select CC_GCC_4_2_or_later
82 select CC_GCC_4_2_or_later
86 prompt "4.2.1 (OBSOLETE)"
87 select CC_GCC_4_2_or_later
92 prompt "4.2.0 (OBSOLETE)"
93 select CC_GCC_4_2_or_later
98 prompt "4.1.2 (OBSOLETE)"
103 prompt "4.0.4 (OBSOLETE)"
108 prompt "3.4.6 (OBSOLETE)"
113 config CC_GCC_4_2_or_later
117 config CC_GCC_4_3_or_later
120 select CC_GCC_4_2_or_later
121 select CC_GCC_USE_GMP_MPFR
123 config CC_GCC_4_4_or_later
126 select CC_GCC_4_3_or_later
127 select CC_GCC_4_2_or_later
128 select CC_GCC_USE_PPL_CLOOG_MPC
130 config CC_GCC_4_5_or_later
133 select CC_GCC_4_4_or_later
134 select CC_GCC_4_3_or_later
135 select CC_GCC_4_2_or_later
136 select CC_GCC_USE_LIBELF
138 config CC_GCC_USE_GMP_MPFR
144 config CC_GCC_USE_PPL_CLOOG_MPC
151 config CC_GCC_USE_LIBELF
158 # Don't remove next line
159 # CT_INSERT_VERSION_STRING_BELOW
160 default "4.5.0" if CC_V_4_5_0
161 default "4.4.3" if CC_V_4_4_3
162 default "4.4.2" if CC_V_4_4_2
163 default "4.4.1" if CC_V_4_4_1
164 default "4.4.0" if CC_V_4_4_0
165 default "4.3.4" if CC_V_4_3_4
166 default "4.3.3" if CC_V_4_3_3
167 default "4.3.2" if CC_V_4_3_2
168 default "4.3.1" if CC_V_4_3_1
169 default "4.3.0" if CC_V_4_3_0
170 default "4.2.4" if CC_V_4_2_4
171 default "4.2.3" if CC_V_4_2_3
172 default "4.2.2" if CC_V_4_2_2
173 default "4.2.1" if CC_V_4_2_1
174 default "4.2.0" if CC_V_4_2_0
175 default "4.1.2" if CC_V_4_1_2
176 default "4.0.4" if CC_V_4_0_4
177 default "3.4.6" if CC_V_3_4_6
181 prompt "Use __cxa_atexit"
183 depends on ! BARE_METAL
185 If you get the missing symbol "__cxa_atexit" when building C++ programs,
186 you might want to try disabling this option.
190 prompt "Use sjlj for exceptions"
191 default CC_SJLJ_EXCEPTIONS_CONFIGURE
192 depends on ! BARE_METAL
194 # This config option is used nowhere in the code on purpose.
195 # It only serves as a choice entry to force neither using nor not using sjlj
196 config CC_SJLJ_EXCEPTIONS_CONFIGURE
198 prompt "Let configure decide"
200 Let configure decide if setjmp/longjmp should be used to handle
203 Choose that if you trust configure to detect the correct settings.
204 This is the default choice.
206 config CC_SJLJ_EXCEPTIONS_USE
208 prompt "Force using sjlj"
210 Do use setjmp/longjmp for exceptions.
211 This is gcc's --enable-sjlj-exceptions configure switch.
213 Choose that if you want to use setjmp/longjmp to handle exceptions.
215 config CC_SJLJ_EXCEPTIONS_DONT_USE
217 prompt "Force not using sjlj"
219 Do not use setjmp/longjmp for exceptions.
220 This is gcc's --disable-sjlj-exceptions configure switch.
222 Choose that if you want to not use setjmp/longjmp to handle exceptions.
226 config CC_ENABLE_CXX_FLAGS
228 prompt "Flags to pass to --enable-cxx-flags"
231 Enter here the value of the gcc's ./configure option --enable-cxx-flags.
232 Leave empty if you don't know better.
234 Note: just pass in the option _value_, that is only the part that goes
237 config CC_CORE_EXTRA_CONFIG
239 prompt "Core gcc extra config"
242 Extra flags to pass onto ./configure when configuring the core gcc.
244 The core gcc is a stripped down, C-only compiler needed to build
245 the C library. Kinda bootstrap gcc, if you wish.
247 config CC_EXTRA_CONFIG
249 prompt "gcc extra config"
251 depends on ! BARE_METAL
253 Extra flags to pass onto ./configure when configuring gcc.
257 prompt "gcc ID string"
258 depends on CC_GCC_4_3_or_later
259 default "crosstool-NG-${CT_VERSION}"
261 Specify a string that identifies your package. You may wish to include
262 a build number or build date. This version string will be included in
263 the output of gcc --version.
265 This is passed to the configure flag --with-pkgversion.
270 depends on CC_GCC_4_3_or_later
273 Specify the URL that users should visit if they wish to report a bug.
275 config CC_LANG_JAVA_USE_ECJ
278 depends on CC_LANG_JAVA
279 depends on CC_GCC_4_3_or_later