Patchwork Fix for PR 58925

login
register
mail settings
Submitter Iyer, Balaji V
Date Oct. 31, 2013, 10:02 p.m.
Message ID <BF230D13CA30DD48930C31D4099330003A497FBE@FMSMSX101.amr.corp.intel.com>
Download mbox | patch
Permalink /patch/287678/
State New
Headers show

Comments

Iyer, Balaji V - Oct. 31, 2013, 10:02 p.m.
Hello Everyone,
	Attached, please find a fix for PR 58925. The issue is summarized below. I will commit this patch tonight since it is trivial, obvious and all the change is in libcilkrts. If anyone has any objections please let me know and I am willing to fix  them.

Thanks, 

Balaji V. Iyer.

-----Original Message-----
From: Iyer, Balaji V 
Sent: Thursday, October 31, 2013 11:36 AM
To: 'gcc@gcc.gnu.org'
Cc: Jeff Law
Subject: Question about a fix for PR 58925

Hello Everyone,	
	I am currently looking to fix the bug reported in PR 58925. Here is the issue,

When the user configures using the following command:
../gcc/configure --enable-version-specific-runtime-libs --disable-bootstrap --disable-werror --disable-multilib --enable-languages=c,c++

Make is OK, but when they do make install: here is the output we get

/include" "AR=/usr/x86_64-pc-linux-gnu/bin/ar" "AS=/var/tmp/gcc_build_dir/./gcc/as" "LD=/var/tmp/gcc_build_dir/./gcc/collect-ld" "LIBCFLAGS=-g -O2" "NM=/var/tmp/gcc_build_dir/./gcc/nm" "PICFLAG=" "RANLIB=/usr/x86_64-pc-linux-gnu/bin/ranlib" "DESTDIR=" DO=install multi-do # make test -z "/usr/lib/gcc/x86_64-pc-linux-gnu/" || /bin/mkdir -p "/usr/lib/gcc/x86_64-pc-linux-gnu/"
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libcilkrts.la '/usr/lib/gcc/x86_64-pc-linux-gnu/'
libtool: install: error: cannot install `libcilkrts.la' to a directory not ending in /usr/lib/gcc/x86_64-pc-linux-gnu/


I googled the error, but most of them seem to say the issue is in libtool and doing a make clean before make would fix it. I tried that and it is not fixing it. Can someone please give me a suggestion as to where/what I should look for?


Thanks,

Balaji V. Iyer.

Patch

diff --git a/libcilkrts/ChangeLog b/libcilkrts/ChangeLog

index 3427243..f87be65 100644

--- a/libcilkrts/ChangeLog

+++ b/libcilkrts/ChangeLog

@@ -1,3 +1,13 @@ 

+2013-10-31  Balaji V. Iyer  <balaji.v.iyer@intel.com>

+

+	PR other/58925

+	* configure.ac: Added target_alias and GCC_LIBSTDCXX_RAW_CXX_FLAGS

+	fields.

+	* configure: Regenerated.

+	* aclocal.m4: Likewise.

+	* Makefile.in: Likewise.

+	* Makefile.am: Added gcc_version field.

+

 2013-10-30  Balaji V. Iyer  <balaji.v.iyer@intel.com>
 
 	* configure.ac: Changed a case statement to include i386.
diff --git a/libcilkrts/Makefile.am b/libcilkrts/Makefile.am

index f332cfb..a3b07ef 100644

--- a/libcilkrts/Makefile.am

+++ b/libcilkrts/Makefile.am

@@ -47,6 +47,9 @@  AM_CFLAGS = $(GENERAL_FLAGS) -std=c99

 AM_CPPFLAGS = $(GENERAL_FLAGS)
 AM_LDFLAGS = -lpthread -ldl
 
+# May be used by toolexeclibdir.

+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)

+

 # Target list.
 toolexeclib_LTLIBRARIES = libcilkrts.la
 
diff --git a/libcilkrts/Makefile.in b/libcilkrts/Makefile.in

index 35e2705..9f459cc 100644

--- a/libcilkrts/Makefile.in

+++ b/libcilkrts/Makefile.in

@@ -122,8 +122,10 @@  DIST_COMMON = $(srcdir)/include/internal/rev.mk README ChangeLog \

 @MAC_LINKER_SCRIPT_TRUE@am__append_2 = -Wl,-exported_symbols_list,$(srcdir)/runtime/mac-symbols.txt
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \

+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \

+	$(top_srcdir)/../config/depstand.m4 \

 	$(top_srcdir)/../config/lead-dot.m4 \
+	$(top_srcdir)/../config/libstdc++-raw-cxx.m4 \

 	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/override.m4 \
 	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
@@ -243,6 +245,8 @@  LD = @LD@

 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
+LIBSTDCXX_RAW_CXX_CXXFLAGS = @LIBSTDCXX_RAW_CXX_CXXFLAGS@

+LIBSTDCXX_RAW_CXX_LDFLAGS = @LIBSTDCXX_RAW_CXX_LDFLAGS@

 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
@@ -323,6 +327,7 @@  sysconfdir = @sysconfdir@

 target = @target@
 target_alias = @target_alias@
 target_cpu = @target_cpu@
+target_noncanonical = @target_noncanonical@

 target_os = @target_os@
 target_vendor = @target_vendor@
 toolexecdir = @toolexecdir@
@@ -346,6 +351,9 @@  AM_CFLAGS = $(GENERAL_FLAGS) -std=c99

 AM_CPPFLAGS = $(GENERAL_FLAGS)
 AM_LDFLAGS = -lpthread -ldl
 
+# May be used by toolexeclibdir.

+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)

+

 # Target list.
 toolexeclib_LTLIBRARIES = libcilkrts.la
 libcilkrts_la_SOURCES = \
diff --git a/libcilkrts/aclocal.m4 b/libcilkrts/aclocal.m4

index 68107ca..c24d0b6 100644

--- a/libcilkrts/aclocal.m4

+++ b/libcilkrts/aclocal.m4

@@ -968,8 +968,10 @@  AC_SUBST([am__tar])

 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([../config/acx.m4])

 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
+m4_include([../config/libstdc++-raw-cxx.m4])

 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
 m4_include([../libtool.m4])
diff --git a/libcilkrts/configure b/libcilkrts/configure

index a2dd79c..41deb9f 100644

--- a/libcilkrts/configure

+++ b/libcilkrts/configure

@@ -681,6 +681,9 @@  am__isrc

 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
+LIBSTDCXX_RAW_CXX_LDFLAGS

+LIBSTDCXX_RAW_CXX_CXXFLAGS

+target_noncanonical

 target_os
 target_vendor
 target_cpu
@@ -2366,6 +2369,36 @@  test -n "$target_alias" &&

     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
 
+target_alias=${target_alias-$host_alias}

+

+ case ${build_alias} in

+  "") build_noncanonical=${build} ;;

+  *) build_noncanonical=${build_alias} ;;

+esac

+

+ case ${host_alias} in

+  "") host_noncanonical=${build_noncanonical} ;;

+  *) host_noncanonical=${host_alias} ;;

+esac

+

+ case ${target_alias} in

+  "") target_noncanonical=${host_noncanonical} ;;

+  *) target_noncanonical=${target_alias} ;;

+esac

+

+

+

+

+

+  LIBSTDCXX_RAW_CXX_CXXFLAGS="\

+    -I\$(top_builddir)/../libstdc++-v3/include \

+    -I\$(top_builddir)/../libstdc++-v3/include/\$(target_noncanonical) \

+    -I\$(top_srcdir)/../libstdc++-v3/libsupc++"

+  LIBSTDCXX_RAW_CXX_LDFLAGS="\

+    \$(top_builddir)/../libstdc++-v3/src/libstdc++.la"

+

+

+

 am__api_version='1.11'
 
 # Find a good install program.  We prefer a C program (faster),
@@ -4878,7 +4911,7 @@  case ${enable_version_specific_runtime_libs} in

     # and header files if --enable-version-specific-runtime-libs option
     # is selected.
     toolexecdir='$(libdir)/gcc/$(target_alias)'
-   toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'

+    toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'

     ;;
   no)
     if test -n "$with_cross_host" &&
@@ -11024,7 +11057,7 @@  else

   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11027 "configure"

+#line 11060 "configure"

 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11130,7 +11163,7 @@  else

   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11133 "configure"

+#line 11166 "configure"

 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libcilkrts/configure.ac b/libcilkrts/configure.ac

index d322616..4582d80 100644

--- a/libcilkrts/configure.ac

+++ b/libcilkrts/configure.ac

@@ -37,6 +37,9 @@  AC_PREREQ([2.64])

 # Needed to define ${target}.  Needs to be very early to avoid annoying
 # warning about calling AC_ARG_PROGRAM before AC_CANONICAL_SYSTEM
 AC_CANONICAL_SYSTEM
+target_alias=${target_alias-$host_alias}

+AC_SUBST(target_alias)

+GCC_LIBSTDCXX_RAW_CXX_FLAGS

 AM_INIT_AUTOMAKE(foreign no-dist)
 
 AM_MAINTAINER_MODE
@@ -86,7 +89,7 @@  case ${enable_version_specific_runtime_libs} in

     # and header files if --enable-version-specific-runtime-libs option
     # is selected.
     toolexecdir='$(libdir)/gcc/$(target_alias)'
-   toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'

+    toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'

     ;;
   no)
     if test -n "$with_cross_host" &&