Merge lp:~peter-pearse/ubuntu/natty/tcl8.5/prop001 into lp:ubuntu/natty/tcl8.5
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~peter-pearse/ubuntu/natty/tcl8.5/prop001 |
Merge into: | lp:ubuntu/natty/tcl8.5 |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~peter-pearse/ubuntu/natty/tcl8.5/prop001 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Langasek | Needs Fixing | ||
Review via email: mp+47641@code.launchpad.net |
Description of the change
During the build the newly built tclsh is used to run commands.
During a cross build this needs to be a build host binary.
I've added a makefile variable CROSS_BUILDING
- no Standard build (build host == target) , newly built (build host) binary used
- yes Cross build, previously prepared build host binary used
- prepass Store away the newly built tclsh binary
debian/rules has been modified. For a cross build, make CROSS_BUILDING=
to prepare the binary, make CROSS_BUILDING=yes is called to build using it.
Note that, for some bootstrapping operations with build == target, the host tclsh needs to be installed. This mechanism has not been modified. See unix/Makefile.in - TCL_EXE.
thanks, this looks pretty good overall. A few minor adjustments I'd like to see before applying:
+ifeq ($(CROSS_BUILDING), yes) DIR)/build_ host_bin/ tclsh host_bin/ tclsh
+ BUILD_TCLSH = $(UNIX_
[...]
+tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} ./build_
inconsistent use of paths; please either use $(UNIX_DIR) everywhere or './' everywhere.
+ifeq ($(CROSS_BUILDING), yes) host_bin/ tclsh
+tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} ./build_
+else
tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE}
+endif
I think this can be more simply written as:
ifeq ($(CROSS_BUILDING), yes) host_bin/ tclsh
tclsh: ./build_
endif
tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE}
If not, then at least this would work:
ifeq ($(CROSS_BUILDING), yes) ./build_ host_bin/ tclsh
CROSS_TARGET=
endif
tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${CROSS_TARGET}
+ifeq ($(CROSS_BUILDING), yes) host_bin/ tclsh: prepass to make." host_bin/ tclsh"
+
+./build_
+ @echo "Need a pre_built tclsh for cross builds"
+ @echo "Install, or build the package, on the host."
+ @echo "If building, pass CROSS_BUILDING=
+ @echo "Copy down resulting tclsh into unix/build_
+
+endif
Rather than spitting out a message, it would be nice if we could handle this entirely in the upstream build rules - i.e., somehow setting a CC_FOR_BUILD variable and building all our build-arch object files in a separate path, so we can do the ./configure once and have tcl do the right thing. This would also improve the odds of such a patch being accepted cleanly upstream, where it would benefit everyone and not just those using this Debian packaging.
How much additional effort do you think it would be to reorganize the patch this way? If it's too hard I'm ok to take this part as-is for now, though we eventually need to clean it up.
Regardless, please address the first two points mentioned above.