#15197: gcc2 cross-tools cannot be moved
--------------------------+------------------------------
Reporter: kallisti5 | Owner: bonefish
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Build System | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
--------------------------+------------------------------
The gcc2 cross-tools cannot be moved. Moving will result in the following
error:
{{{
# /toolchains/cross-tools-x86_gcc2/bin/i586-pc-haiku-cpp -v
Using builtin specs.
gcc version 2.95.3-haiku-2017_07_20
cpp0 -lang-c -v -D__ELF__ -D__HAIKU__ -D__INTEL__ -D_X86_=1
-D__stdcall=__attribute__((__stdcall__))
-D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x))
-D__STDC_ISO_10646__=201103L -D__ELF__ -D__HAIKU__ -D__INTEL__ -D_X86_=1
-D__stdcall=__attribute__((__stdcall__))
-D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x))
-D__STDC_ISO_10646__=201103L -Asystem(haiku) -Acpu(i386) -Amachine(i386)
-Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__
-D__pentium -D__pentium__ -D__PIC__ -D__pic__ -
i586-pc-haiku-cpp: installation problem, cannot exec `cpp0': No such file
or directory
}}}
The reason is because gcc2 seems to hard-code the path into the binaries:
{{{
root@22c9375a89e0:/work/haiku/generated.x86_gcc2# /toolchains/cross-tools-
x86_gcc2/bin/i586-pc-haiku-cpp -print-search-dirs
install: /tmp/build/10ff1af8/crosstools.x86_gcc2/cross-tools-x86_gcc2/lib
/gcc-lib/i586-pc-haiku/2.95.3-haiku-2017_07_20/
programs: /tmp/build/10ff1af8/crosstools.x86_gcc2/cross-tools-x86_gcc2/lib
/gcc-lib/i586-pc-haiku/2.95.3-haiku-
2017_07_20/:/tmp/build/10ff1af8/crosstools.x86_gcc2/cross-tools-
x86_gcc2/lib/gcc-lib/i586-pc-haiku/:/usr/lib/gcc/i586-pc-haiku/2.95.3
-haiku-2017_07_20/:/usr/lib/gcc/i586-pc-
haiku/:/tmp/build/10ff1af8/crosstools.x86_gcc2/cross-tools-x86_gcc2/i586
-pc-haiku/bin/i586-pc-haiku/2.95.3-haiku-
2017_07_20/:/tmp/build/10ff1af8/crosstools.x86_gcc2/cross-tools-
x86_gcc2/i586-pc-haiku/bin/
libraries: /tmp/build/10ff1af8/crosstools.x86_gcc2/cross-tools-
x86_gcc2/lib/gcc-lib/i586-pc-haiku/2.95.3-haiku-
2017_07_20/:/usr/lib/gcc/i586-pc-haiku/2.95.3-haiku-
2017_07_20/:/tmp/build/10ff1af8/crosstools.x86_gcc2/cross-tools-
x86_gcc2/i586-pc-haiku/lib/i586-pc-haiku/2.95.3-haiku-
2017_07_20/:/tmp/build/10ff1af8/crosstools.x86_gcc2/cross-tools-
x86_gcc2/i586-pc-haiku/lib/
}}}
Prefixing with a new COMPILER_PATH env var seems to fix the issue, however
we should likely patch our gcc2 code to be "better"
{{{
COMPILER_PATH=/toolchains/cross-tools-x86_gcc2/lib/gcc-lib/ /toolchains
/cross-tools-x86_gcc2/bin/i586-pc-haiku-cpp -v
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/15197>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.