Cross building gcc-3.4-branch (20040316) installs gcjh twice, once host-prefixed and once double host-prefixed: Example: configure --target=sparc-rtems4.7 --prefix=/opt/rtems-4.7 ... ... make install Results into: /opt/rtems-4.7/bin/sparc-rtems4.7-gcjh /opt/rtems-4.7/bin/sparc-rtems4.7-sparc-rtems4.7-gcjh I guess there should only be one sparc-rtems4.7-gcjh.
*** Bug 17939 has been marked as a duplicate of this bug. ***
Do you get a double prefix for gcj as well? Can you tell me how the Makefile variable program_transform_name is set in <build>/gcc/Makefile? I suspect the problem is that GCJH_TARGET_INSTALL_NAME adds a second prefix. Also, based on comparing Make-lang.in, I would say that this bug probably exists on the trunk as well.
Subject: Re: Double target prefixed gcjh tromey at gcc dot gnu dot org wrote: >------- Additional Comments From tromey at gcc dot gnu dot org 2004-10-11 19:08 ------- >Do you get a double prefix for gcj as well? > > For the avr target, no. >Can you tell me how the Makefile variable program_transform_name >is set in <build>/gcc/Makefile? > > > For the avr target: # Sed command to transform gcc to installed name. program_transform_name := s,^,avr-,;
I suppose you could try this. I made it by looking at what other install rules are doing in this area. I'm not at all sure it is correct. Index: Make-lang.in =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/Make-lang.in,v retrieving revision 1.145 diff -u -r1.145 Make-lang.in --- Make-lang.in 22 Sep 2004 11:21:21 -0000 1.145 +++ Make-lang.in 11 Oct 2004 21:17:52 -0000 @@ -207,7 +207,9 @@ rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ chmod a+x $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ - if [ $$tool = gcjh ]; then \ + if [ -f $(GCJ)-cross$(exeext) ]; then \ + true; \ + elif [ $$tool = gcjh ]; then \ rm -f $(DESTDIR)$(bindir)/$(GCJH_TARGET_INSTALL_NAME)$(exeext); \ ( cd $(DESTDIR)$(bindir) && \ $(LN) $$tool_transformed_name$(exeext) $(GCJH_TARGET_INSTALL_NAME)$(exeext) ); \
Subject: Re: Double target prefixed gcjh tromey at gcc dot gnu dot org wrote: >------- Additional Comments From tromey at gcc dot gnu dot org 2004-10-11 21:20 ------- >I suppose you could try this. >I made it by looking at what other install rules are >doing in this area. I'm not at all sure it is correct. > >Index: Make-lang.in >=================================================================== >RCS file: /cvs/gcc/gcc/gcc/java/Make-lang.in,v >retrieving revision 1.145 >diff -u -r1.145 Make-lang.in >--- Make-lang.in 22 Sep 2004 11:21:21 -0000 1.145 >+++ Make-lang.in 11 Oct 2004 21:17:52 -0000 >@@ -207,7 +207,9 @@ > rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ > $(INSTALL_PROGRAM) $$tool$(exeext) >$(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ > chmod a+x $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ >- if [ $$tool = gcjh ]; then \ >+ if [ -f $(GCJ)-cross$(exeext) ]; then \ >+ true; \ >+ elif [ $$tool = gcjh ]; then \ > rm -f $(DESTDIR)$(bindir)/$(GCJH_TARGET_INSTALL_NAME)$(exeext); \ > ( cd $(DESTDIR)$(bindir) && \ > $(LN) $$tool_transformed_name$(exeext) >$(GCJH_TARGET_INSTALL_NAME)$(exeext) ); \ > > > > Patch works for the avr target. Thanks! Eric
Confirmed. Eric, do you happen to know when this bug first appeared? Did you build other older compilers which did not have this problem? Tom, are you going to submit this patch then?
Subject: Re: Double target prefixed gcjh On 13 Oct 2004 at 12:03, giovannibajo at libero dot it wrote: > > ------- Additional Comments From giovannibajo at libero dot it 2004-10-13 12:03 ------- > Confirmed. > > Eric, do you happen to know when this bug first appeared? Did you build other > older compilers which did not have this problem? > Unfortunately no, I do not know when this bug first appeared. Only in the last week did I first try to build java for the avr target, and to my knowledge it's the first time anybody has tried it. You can see some messages about this on the java list. And, no, I did not build it with older compilers. I can't speak for the original reporter of this bug though. Eric
(In reply to comment #7) > > Eric, do you happen to know when this bug first appeared? I noticed it for the first time shortly before submitting this PR (Opened: 2004-03-17; cf. above;). I don't recall the corresponding gcc-release off hand but notes in my build-scripts indicate this bug to have appeared before gcc-3.4.0. As gcj doesn't build for most of my "usual targets" (embedded *rtems cross-toolchiains) due to lack of the infrastructure it requires, I have disabled building gcj since then and can't tell if this issue has re-appeared or if had been persistent since then. > I can't speak for the original reporter of this bug though. I am the original reporter ;)
Subject: Bug 14614 CVSROOT: /cvs/gcc Module name: gcc Changes by: tromey@gcc.gnu.org 2004-12-03 19:32:39 Modified files: gcc/java : ChangeLog Make-lang.in Log message: PR bootstrap/14614: * Make-lang.in (java.install-common): Only install transformed Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1514&r2=1.1515 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/Make-lang.in.diff?cvsroot=gcc&r1=1.149&r2=1.150
Fix checked in