FS#19808 - [gcc] unable to build with makepkg + Additional Feature for easing cross compilation

Attached to Project: Arch Linux
Opened by Guillaume Chanaud (gehasia) - Tuesday, 15 June 2010, 14:59 GMT
Last edited by Allan McRae (Allan) - Tuesday, 15 June 2010, 23:29 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
PKGBUILD for Gcc has a little typo on line 66 :
../configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada \
should be replaced with :
./configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada \

for the configure to work when building from abs

A cool additional feature for easing cross compilation would be this
./configure --build=${CHOST} --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada \

In fact adding the --build=${CHOST} will force gcc to be built for the platform defined in makepkg.conf
Without this, GCC guess the system arch from "uname" and "/bin/arch", which always return the current plateform, even if we are in a 32bit chrooted environment.


Additional info:
* package version(s)
pkgver=4.5.0
* config and/or log files etc.


Steps to reproduce:
abs
cd /var/abs/core/gcc
makepkg
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 15 June 2010, 23:29 GMT
Reason for closing:  Not a bug
Comment by Guillaume Chanaud (gehasia) - Tuesday, 15 June 2010, 15:09 GMT
Sorry, i though flyspray would offer me to review my bugreport, and now i can't change it :(
so this bug report is for [core/GCC]
Comment by Guillaume Chanaud (gehasia) - Tuesday, 15 June 2010, 17:28 GMT
Slapping me for this report, in fact the ../configure is correct that's the line above which fail.
It fails if you have a first makepkg which has been aborted for numerous reasons.
When you try makepkg the second time, the script tries to create the directory and to cd to it
but as it fails to create the buil directory (dir already exists), the && cd build is not executed
so

mkdir build && cd build
../configure .....
has to be
mkdir -p build && cd build
../configure .....

and that should work with the --build=${CHOST} configure flag for cross compilation easing
For the additional feature request, i try to have something correct because it was working wrongly... I'll post the real working things when ready

Loading...