aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-omap-pm/dss2.diff
blob: 8d3d2fdca6d468246d5f981e089c7ed2ac48c64a (plain)
1
2
3
4
5
6
7
8
9
--- /tmp/Makefile	2009-01-12 15:50:04.000000000 +0100
+++ git/arch/arm/plat-omap/Makefile	2009-01-12 15:50:25.000000000 +0100
@@ -32,3 +32,6 @@
 obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o
 obj-$(CONFIG_OMAP_PM_SRF) += omap-pm-srf.o \
 				resource.o
+
+# OMAP2/3 Display Subsystem
+obj-y += dss/
Literal.Number */ .highlight .s { color: #e6db74 } /* Literal.String */ .highlight .na { color: #a6e22e } /* Name.Attribute */ .highlight .nb { color: #f8f8f2 } /* Name.Builtin */ .highlight .nc { color: #a6e22e } /* Name.Class */ .highlight .no { color: #66d9ef } /* Name.Constant */ .highlight .nd { color: #a6e22e } /* Name.Decorator */ .highlight .ni { color: #f8f8f2 } /* Name.Entity */ .highlight .ne { color: #a6e22e } /* Name.Exception */ .highlight .nf { color: #a6e22e } /* Name.Function */ .highlight .nl { color: #f8f8f2 } /* Name.Label */ .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ .highlight .nx { color: #a6e22e } /* Name.Other */ .highlight .py { color: #f8f8f2 } /* Name.Property */ .highlight .nt { color: #f92672 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#! /bin/sh -e

# DP: - Set the libjava sublibdir to /usr/lib/gcj-4.3
# DP: - Set the default libgcj database dir to /var/lib/gcj-4.3

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
	cd ${dir}libjava && aclocal -I . -I .. -I ../config -I libltdl && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
	rm -f ${dir}libjava/configure
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

--- gcc/java/Make-lang.in.orig	2007-09-06 21:19:09.582719152 +0200
+++ gcc/java/Make-lang.in	2007-09-06 21:20:32.543970604 +0200
@@ -313,12 +313,13 @@
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ZLIBINC) \
 		$(srcdir)/java/jcf-io.c $(OUTPUT_OPTION)
 
+short_version := $(shell echo $(version) | sed -r 's/([0-9]+\.[0-9]+).*/\1/')
 # jcf-path.o needs a -D.
 java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   java/jcf.h
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-	  -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \
-	  -DDEFAULT_TARGET_VERSION=\"$(version)\" \
+	  -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(short_version).jar"' \
+	  -DDEFAULT_TARGET_VERSION=\"$(short_version)\" \
 	  $(srcdir)/java/jcf-path.c $(OUTPUT_OPTION)
 
 TEXI_JAVA_FILES = java/gcj.texi $(gcc_docdir)/include/fdl.texi		\
--- libjava/classpath/configure.ac.orig	2008-01-13 17:18:19.000000000 +0100
+++ libjava/classpath/configure.ac	2008-01-13 17:18:45.000000000 +0100
@@ -301,7 +301,7 @@
 	     nativeexeclibdir=${withval}
 	    ],
 	    [
-	     nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version`
+	     nativeexeclibdir='${toolexeclibdir}/gcj-'`sed -r 's/([[0-9]]+\.[[0-9]]+).*/\1/' ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version`
 	    ])
 
 AC_SUBST(nativeexeclibdir)
--- libjava/classpath/configure.orig	2008-01-13 17:18:20.000000000 +0100
+++ libjava/classpath/configure	2008-01-13 17:18:45.000000000 +0100
@@ -4771,7 +4771,7 @@
 
 else
 
-	     nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[^#].*:/ { print $1 }' ${srcdir}/../libtool-version`
+	     nativeexeclibdir='${toolexeclibdir}/gcj-'`sed -r 's/([0-9]+\.[0-9]+).*/\1/' ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[^#].*:/ { print $1 }' ${srcdir}/../libtool-version`
 
 fi;
 
--- libjava/testsuite/lib/libjava.exp.orig	2008-01-13 17:18:20.000000000 +0100
+++ libjava/testsuite/lib/libjava.exp	2008-01-13 17:18:45.000000000 +0100
@@ -169,6 +169,7 @@
     set text [eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout"]
     regexp " version \[^\n\r\]*" $text version
     set libjava_version [lindex $version 1]
+    set libjava_version "4.3"
 
     verbose "version: $libjava_version"
 
--- libjava/testsuite/Makefile.am.orig	2008-01-13 17:18:20.000000000 +0100
+++ libjava/testsuite/Makefile.am	2008-01-13 17:18:45.000000000 +0100
@@ -4,6 +4,7 @@
 
 # May be used by various substitution variables.
 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_short_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER)
 
 # autoconf2.13's target_alias
 target_noncanonical = @target_noncanonical@
@@ -59,11 +60,11 @@
 	  rm -rf $$testtmpdir; $(mkdir_p) $$testtmpdir; \
 	  if test -n "$$testdep"; then \
 	    $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \
-	      $(top_builddir)/libgcj-$(gcc_version).jar::$$testtmpdir \
+	      $(top_builddir)/libgcj-$(gcc_short_version).jar::$$testtmpdir \
 	      -d $$testtmpdir $(srcdir)/$$testdep || exit; \
 	  fi; \
 	  $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \
-	    $(top_builddir)/libgcj-$(gcc_version).jar:$$testtmpdir \
+	    $(top_builddir)/libgcj-$(gcc_short_version).jar:$$testtmpdir \
 	    -d $$testtmpdir $(srcdir)/$$test || exit; \
 	  case "$$test" in \
 	    libjava.loader/dummy.java) \
@@ -75,7 +76,7 @@
 	  esac; \
 	  if test -n "$$genheader"; then \
 	    $(MYGCJH) $$genheader $$testtmpdir/*.class \
-	      -bootclasspath $(top_builddir)/libgcj-$(gcc_version).jar \
+	      -bootclasspath $(top_builddir)/libgcj-$(gcc_short_version).jar \
 	      -d $$testtmpdir/ || exit; \
 	    mv $$testtmpdir/*.h $(srcdir)/`dirname $$test`/ 2>/dev/null; \
 	  fi; \
--- libjava/testsuite/Makefile.in.orig	2008-01-13 17:18:20.000000000 +0100
+++ libjava/testsuite/Makefile.in	2008-01-13 17:18:45.000000000 +0100
@@ -327,6 +327,7 @@
 
 # May be used by various substitution variables.
 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_short_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER)
 
 # Setup the testing framework, if you have one
 EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \
@@ -576,11 +577,11 @@
 @JAVA_MAINTAINER_MODE_TRUE@	  rm -rf $$testtmpdir; $(mkdir_p) $$testtmpdir; \
 @JAVA_MAINTAINER_MODE_TRUE@	  if test -n "$$testdep"; then \
 @JAVA_MAINTAINER_MODE_TRUE@	    $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \
-@JAVA_MAINTAINER_MODE_TRUE@	      $(top_builddir)/libgcj-$(gcc_version).jar::$$testtmpdir \
+@JAVA_MAINTAINER_MODE_TRUE@	      $(top_builddir)/libgcj-$(gcc_short_version).jar::$$testtmpdir \
 @JAVA_MAINTAINER_MODE_TRUE@	      -d $$testtmpdir $(srcdir)/$$testdep || exit; \
 @JAVA_MAINTAINER_MODE_TRUE@	  fi; \
 @JAVA_MAINTAINER_MODE_TRUE@	  $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \
-@JAVA_MAINTAINER_MODE_TRUE@	    $(top_builddir)/libgcj-$(gcc_version).jar:$$testtmpdir \
+@JAVA_MAINTAINER_MODE_TRUE@	    $(top_builddir)/libgcj-$(gcc_short_version).jar:$$testtmpdir \
 @JAVA_MAINTAINER_MODE_TRUE@	    -d $$testtmpdir $(srcdir)/$$test || exit; \
 @JAVA_MAINTAINER_MODE_TRUE@	  case "$$test" in \
 @JAVA_MAINTAINER_MODE_TRUE@	    libjava.loader/dummy.java) \
@@ -592,7 +593,7 @@
 @JAVA_MAINTAINER_MODE_TRUE@	  esac; \
 @JAVA_MAINTAINER_MODE_TRUE@	  if test -n "$$genheader"; then \
 @JAVA_MAINTAINER_MODE_TRUE@	    $(MYGCJH) $$genheader $$testtmpdir/*.class \
-@JAVA_MAINTAINER_MODE_TRUE@	      -bootclasspath $(top_builddir)/libgcj-$(gcc_version).jar \
+@JAVA_MAINTAINER_MODE_TRUE@	      -bootclasspath $(top_builddir)/libgcj-$(gcc_short_version).jar \
 @JAVA_MAINTAINER_MODE_TRUE@	      -d $$testtmpdir/ || exit; \
 @JAVA_MAINTAINER_MODE_TRUE@	    mv $$testtmpdir/*.h $(srcdir)/`dirname $$test`/ 2>/dev/null; \
 @JAVA_MAINTAINER_MODE_TRUE@	  fi; \
--- libjava/Makefile.am.orig	2008-01-13 17:18:20.000000000 +0100
+++ libjava/Makefile.am	2008-01-13 17:18:45.000000000 +0100
@@ -5,7 +5,8 @@
 ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_full_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER)
 
 SUBDIRS = $(DIRLTDL) gcj include classpath
 if TESTSUBDIR
@@ -27,9 +28,9 @@
 target_noncanonical = @target_noncanonical@
 
 # This is required by TL_AC_GXX_INCLUDE_DIR.
-libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
+libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_full_version)
 
-libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_full_version)
 
 ##
 ## What gets installed, and where.
@@ -141,7 +142,7 @@
 	-DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
 	-DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
 	-DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
-	-DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
+	-DLIBGCJ_DEFAULT_DATABASE="\"/var/lib/gcj-4.3/$(db_name)\"" \
 	-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
 
 AM_GCJFLAGS = \
--- libjava/Makefile.in.orig	2008-01-13 17:18:20.000000000 +0100
+++ libjava/Makefile.in	2008-01-13 17:18:45.000000000 +0100
@@ -816,7 +816,8 @@
 ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_full_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER)
 SUBDIRS = $(DIRLTDL) gcj include classpath $(am__append_1)
 
 # write_entries_to_file - writes each entry in a list
@@ -829,8 +830,8 @@
 write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2)))
 
 # This is required by TL_AC_GXX_INCLUDE_DIR.
-libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
-libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_full_version)
+libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_full_version)
 toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la \
 	$(am__append_2) $(am__append_3)
 toolexecmainlib_DATA = libgcj.spec
@@ -875,7 +876,7 @@
 	-DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
 	-DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
 	-DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
-	-DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
+	-DLIBGCJ_DEFAULT_DATABASE="\"/var/lib/gcj-4.3/$(db_name)\"" \
 	-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
 
 AM_GCJFLAGS = \
--- libjava/configure.ac.orig	2008-01-13 17:18:20.000000000 +0100
+++ libjava/configure.ac	2008-01-13 17:18:45.000000000 +0100
@@ -511,6 +511,9 @@
   AS_HELP_STRING([--with-java-home=DIRECTORY],
                  [value of java.home system property]),
 		 [JAVA_HOME="${withval}"], [JAVA_HOME=""])
+if test -n "$with_multisubdir"; then
+  JAVA_HOME=`echo $JAVA_HOME | sed "s,/usr/lib/,/usr/lib$with_multisubdir/,"`
+fi
 AM_CONDITIONAL(JAVA_HOME_SET, test ! -z "$JAVA_HOME")
 AC_SUBST(JAVA_HOME)
 
@@ -1385,6 +1388,7 @@
     multi_os_directory=`$CC -print-multi-os-directory`
     case $multi_os_directory in
       .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
+      ../lib*) toolexeclibdir='$(subst /lib/../lib,/lib,'$toolexecmainlibdir/$multi_os_directory')' ;;
       *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
     esac
     ;;
@@ -1395,6 +1399,7 @@
 
 # Determine gcj and libgcj version number.
 gcjversion=`cat "$srcdir/../gcc/BASE-VER"`
+short_version=`sed -r 's/([[0-9]]+\.[[0-9]]+).*/\1/' $srcdir/../gcc/BASE-VER`
 libgcj_soversion=`awk -F: '/^[[^#]].*:/ { print $1 }' $srcdir/libtool-version`
 GCJVERSION=$gcjversion
 AC_SUBST(GCJVERSION)
@@ -1402,7 +1407,7 @@
 
 # Determine where the standard .db file and GNU Classpath JNI
 # libraries are found.
-gcjsubdir=gcj-$gcjversion-$libgcj_soversion
+gcjsubdir=gcj-$short_version-$libgcj_soversion
 multi_os_directory=`$CC -print-multi-os-directory`
 case $multi_os_directory in
   .)