While building 4.7.1 for target AVR, make install honors --program-prefix/--program-suffix for all installed binaries except for 'gcc'. This one is always installed as ''avr-gcc-4.7.1'' HOW TO REPRODUCE: ================= I tested several combination of --progam-prefix/--program-suffix summerized below. Each time ../gcc-${VERSION} is a clean gcc source directory. I build on Debian Squeeze using debian-packaged gcc and tools. I tested both with 4.7.1 and 4.6.3 with the same results: (1) When I configure without program-suffix and -prefix, I indeed got gcc installed as 'avr-gcc-4.7.1' -- but all other binaries lack the '-4.7.1' suffix (including g++): sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \ --target=avr --enable-languages=c,c++ sh$ make -j9 && make install sh$ ls /tmp/gcc-4.7.1/bin/ avr-c++ avr-g++ avr-gcc-4.7.1 avr-gcc-nm avr-gcov avr-cpp avr-gcc avr-gcc-ar avr-gcc-ranlib (2) When I only add the '-4.7.1' suffix, gcc is still installed as 'avr-gcc-4.7.1' and all other binaries have the correct suffix -- but no longer their prefix: sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \ --target=avr --enable-languages=c,c++ \ --program-suffix=-4.7.1 sh$ make -j9 && make install sh$ ls /tmp/gcc-4.7.1/bin/ avr-gcc-4.7.1 cpp-4.7.1 gcc-4.7.1 gcc-nm-4.7.1 gcov-4.7.1 c++-4.7.1 g++-4.7.1 gcc-ar-4.7.1 gcc-ranlib-4.7.1 (3) When I only add the 'avr-' prefix things are going just like in (1) (without -prefix and -suffix): gcc is installed as 'avr-gcc-4.7.1' and all other binaries only have the 'avr-' prefix: sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \ --target=avr --enable-languages=c,c++ \ --program-prefix=avr- sh$ make -j9 && make install sh$ ls /tmp/gcc-4.7.1/bin/ avr-c++ avr-g++ avr-gcc-4.7.1 avr-gcc-nm avr-gcov avr-cpp avr-gcc avr-gcc-ar avr-gcc-ranlib (4) When I both configure with prefix 'avr-' and suffix '-4.7.1', I got all my binaries installed with the correct prefix and suffix -- except that gcc is /missing/ ! sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \ --target=avr --enable-languages=c,c++ \ --program-prefix=avr- \ --program-suffix=-4.7.1 sh$ make -j9 && make install sh$ ls /tmp/gcc-4.7.1/bin/ avr-c++-4.7.1 avr-g++-4.7.1 avr-gcc-nm-4.7.1 avr-gcov-4.7.1 avr-cpp-4.7.1 avr-gcc-ar-4.7.1 avr-gcc-ranlib-4.7.1 (5) When I use a different suffix and no prefix, gcc still is installed as ''avr-gcc-4.7.1' whereas the other binaries are installed with the requested suffix: sh$ ../gcc-${VERSION}/configure --prefix=/tmp/gcc-${VERSION} \ --target=avr --enable-languages=c,c++ \ --program-suffix=-custom sh$ make -j9 && make install sh$ ls /tmp/gcc-4.7.1/bin/ avr-gcc-4.7.1 cpp-custom gcc-custom gcc-ranlib-custom g++-custom c++-custom gcc-ar-custom gcc-nm-custom gcov-custom
I don't think it is right to use --program-suffix == the version and --program-prefix == target.
Patch proposed here: http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00905.html
Created attachment 28520 [details] pr54030.diff tentative patch The patch from http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00905.html has been approved in http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00929.html However, there are issues: - No ChangeLog provided - Patch in ML is against 4.7 - Patch in ML is not in a valid patch format
Mine isn't an approval as I am not a maintainer. I reviewed it because I know that part of the Makefile and I am familiar with what they want to do. I did this to spur an actual reviewer to approve it.
(In reply to comment #4) > I reviewed it because I know that part of the Makefile and I am > familiar with what they want to do. Waht would be a reasonable changelog? I am not familiar with that and all the $s there. The only I can see swapping "rm" and installing "xgcc".