Opened 14 years ago

Closed 13 years ago

#252 closed enhancement (fixed)

Change default CROSS_PREFIX to /usr/local/cross

Reported by: Martin Decky Owned by:
Priority: trivial Milestone: 0.5.0
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Building HelenOS using the cross-compiler toolchain built by our toolchain.sh script is the recommended practice. Because of historical reasons the cross-compilers are located in /usr/local by default (this can be overridden both in toolchain.sh and in the HelenOS build system by the CROSS_PREFIX environment variable).

However, using /usr/local as a prefix leads to the creation of various subdirectories named ia32, amd64, etc. directly in /usr/local, which is probably not the best way to go.

Therefore this is an RFC for changing the default value of CROSS_PREFIX to /usr/local/cross.

Change History (6)

comment:1 by Jiri Svoboda, 14 years ago

Sounds like a good idea, I've been thinking the same myself for some time. Actually I would suggest a path that would somehow indicate it's a HelenOS cross toolchain - because it is. You can hardly expect to use it to compile anything else.

Conversely, the support for 'native' compiler is IMHO a little unfortunate since it makes uninformed newcomers think they can compile HelenOS binaries with the compiler targetting their (arbitrary) OS. Just think of it! Try and compile a Linux binary with a windows compiler, it will be (nearly) the same thing. If it works, it is just due to the fact that HelenOS does not have its own ABI (or executable format, for that matter) and pretends to be existing OSes.

comment:2 by Martin Decky, 14 years ago

Actually I would suggest a path that would somehow indicate it's a HelenOS cross toolchain - because it is. You can hardly expect to use it to compile anything else.

I would disagree. It is a cross-compiler which you can use to compile possibly many things, not only HelenOS. There are no HelenOS-specific tweaks in the compiler. Therefore I don't see a reason why not using a generic (but still informative) path.

Conversely, the support for 'native' compiler is IMHO a little unfortunate since it makes uninformed newcomers think they can compile HelenOS binaries with the compiler targetting their (arbitrary) OS

Well, we don't support just any arbitrary native compiler, we at least require it to be GCC, Clang, ICC, etc. But yes, I see your point and we have encountered many problems originating in the fact that people we trying to compile HelenOS with their broken native GCC.

comment:3 by Jiri Svoboda, 14 years ago

The Architecture names like ia32, ia64, arm32, ppc32 is a purely HelenOS-specific terminology (those are the names of HelenOS ports).

Somewhat less specific is the choice of targets. Basically the 'xxx' directory contains the target used to build HelenOS port 'xxx'. Since (incidentally) HelenOS squats in GNU/Linux targets on all its ports, you could admittedly use them to build Linux binaries as well (but not FreeBSD or IRIX binaries). Note, however, that this could actually change in the future (at least theoretically) if we decide to squat in other targets.

comment:4 by Jakub Jermář, 13 years ago

Milestone: 0.5.00.5.1

comment:5 by Jakub Jermář, 13 years ago

Type: proposalenhancement

comment:6 by Martin Decky, 13 years ago

Resolution: fixed
Status: newclosed

Implemented in revision 904.

Note: See TracTickets for help on using tickets.