public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Help with using multilib for Cilk Library
@ 2013-07-19 18:22 Iyer, Balaji V
  2013-07-19 22:26 ` Ian Lance Taylor
  0 siblings, 1 reply; 10+ messages in thread
From: Iyer, Balaji V @ 2013-07-19 18:22 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org', 'Ian Lance Taylor (iant@google.com)'

[-- Attachment #1: Type: text/plain, Size: 3686 bytes --]

Hello Everyone,
	I am trying to use Multilib on Cilk Library. I looked at this website (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer and libgo as samples to model after. It is currently failing with the following error message:

libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++ -I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -I/export/users/my-files/gcc/libstdc++-v3/libsupc++ -I/export/users/my-files/gcc/libstdc++-v3/include/backward -I/export/users/my-files/gcc/libstdc++-v3/testsuite/util -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/bin/ -B/export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/sys-include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o /export/users/my-files/b-gcc-multilib/./gcc/32/crtbeginS.o  .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk-for.o .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o .libs/c_reducers.o .libs/except-gcc.o .libs/frame_malloc.o .libs/full_frame.o .libs/global_state.o .libs/jmpbuf.o .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -Wl,-rpath -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64 -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib -L/usr/lib/../lib -L/export/users/my-files/b-gcc-multilib/./gcc /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc -lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o .libs/libcilkrts.so.5.0.3511
/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[4]: *** [libcilkrts.la] Error 1
make[4]: Leaving directory `/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libcilkrts'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/export/users/my-files/b-gcc


From what it looks like, it is reading the 64 bit library for the 32 bit mode (or vice-versa). How do I fix this? I am also attaching my configure.ac and Makefile.am. Please note that it is not fully cleaned up (e.g. I have stuff commented out etc). Can someone please tell me what I am doing wrong?

Any help is greatly appreciated!

Thanks,

Balaji V. Iyer.


[-- Attachment #2: configure.ac --]
[-- Type: application/octet-stream, Size: 3232 bytes --]

#  @copyright
#  Copyright (C) 2011
#  Intel Corporation
#  
#  @copyright
#  This file is part of the Intel Cilk Plus Library.  This library is free
#  software; you can redistribute it and/or modify it under the
#  terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 3, or (at your option)
#  any later version.
#  
#  @copyright
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  @copyright
#  Under Section 7 of GPL version 3, you are granted additional
#  permissions described in the GCC Runtime Library Exception, version
#  3.1, as published by the Free Software Foundation.
#  
#  @copyright
#  You should have received a copy of the GNU General Public License and
#  a copy of the GCC Runtime Library Exception along with this program;
#  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
#  <http://www.gnu.org/licenses/>.

AC_INIT([Cilk Runtime Library], [2.0], [cilk@intel.com])
AC_PREREQ([2.64])
# AM_INIT_AUTOMAKE([1.11 no-define])
AM_INIT_AUTOMAKE(foreign no-dist)

# Build a DLL on Windows
# AC_LIBTOOL_WIN32_DLL
AC_PROG_CXX
AC_PROG_CC
# AC_PROG_LIBTOOL
# AC_CONFIG_MACRO_DIR([..])
AC_CONFIG_FILES([Makefile])
AM_ENABLE_MULTILIB(, ..)

if test "${multilib}" = "yes"; then
  multilib_arg="--enable-multilib"
else
  multilib_arg=
fi

AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
AC_ARG_ENABLE([version-specific-runtime-libs],
  AC_HELP_STRING([--enable-version-specific-runtime-libs],
                 [Specify that runtime libraries should be installed in a compiler-specific directory]),
  [case "$enableval" in
    yes) enable_version_specific_runtime_libs=yes ;;
    no)  enable_version_specific_runtime_libs=no ;;
    *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
   esac],
  [enable_version_specific_runtime_libs=no])
AC_MSG_RESULT($enable_version_specific_runtime_libs)


# Calculate toolexeclibdir
# Also toolexecdir, though it's only used in toolexeclibdir
case ${enable_version_specific_runtime_libs} in
  yes)
    # Need the gcc compiler version to know where to install libraries
    # and header files if --enable-version-specific-runtime-libs option
    # is selected.
    toolexecdir='$(libdir)/gcc/$(target_alias)'
    toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
    ;;
  no)
    if test -n "$with_cross_host" &&
       test x"$with_cross_host" != x"no"; then
      # Install a library built with a cross compiler in tooldir, not libdir.
      toolexecdir='$(exec_prefix)/$(target_alias)'
      toolexeclibdir='$(toolexecdir)/lib'
    else
      toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
      toolexeclibdir='$(libdir)'
    fi
    multi_os_directory=`$CC -print-multi-os-directory`
    case $multi_os_directory in
      .) ;; # Avoid trailing /.
      *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
    esac
    ;;
esac
AC_SUBST(toolexecdir)
AC_SUBST(toolexeclibdir)

AM_PROG_LIBTOOL
AC_SUBST(enable_shared)
AC_SUBST(enable_static)
AC_OUTPUT

[-- Attachment #3: Makefile.am --]
[-- Type: application/octet-stream, Size: 3970 bytes --]

#  @copyright
#  Copyright (C) 2011
#  Intel Corporation
#  
#  @copyright
#  This file is part of the Intel Cilk Plus Library.  This library is free
#  software; you can redistribute it and/or modify it under the
#  terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 3, or (at your option)
#  any later version.
#  
#  @copyright
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  @copyright
#  Under Section 7 of GPL version 3, you are granted additional
#  permissions described in the GCC Runtime Library Exception, version
#  3.1, as published by the Free Software Foundation.
#  
#  @copyright
#  You should have received a copy of the GNU General Public License and
#  a copy of the GCC Runtime Library Exception along with this program;
#  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
#  <http://www.gnu.org/licenses/>.

AUTOMAKE_OPTIONS = foreign

# Use when building GCC
ACLOCAL_AMFLAGS = -I .. -I ../config

# Use when just building the Intel Cilk Plus runtime
#ACLOCAL_AMFLAGS = -I m4

# Compiler and linker flags.
GENERAL_FLAGS = -I$(top_srcdir)/include -DIN_CILK_RUNTIME=1
GENERAL_FLAGS += -fpic -O3
GENERAL_FLAGS += -DBUILD_USER=\"$(USER)\"
GENERAL_FLAGS += -DBUILD_HOST=\"`hostname`\"

# Enable Intel Cilk Plus extension
GENERAL_FLAGS += -fcilkplus

AM_CFLAGS = $(GENERAL_FLAGS) -std=c99
AM_CPPFLAGS = $(GENERAL_FLAGS)
AM_LDFLAGS = -lpthread -ldl

# Target list.
lib_LTLIBRARIES = libcilkrts.la

libcilkrts_la_SOURCES =            \
  runtime/bug.cpp                  \
  runtime/cilk-abi.c               \
  runtime/cilk-abi-cilk-for.cpp    \
  runtime/cilk-abi-vla.c           \
  runtime/cilk-abi-vla-internal.c  \
  runtime/cilk_api.c               \
  runtime/cilk_fiber.cpp           \
  runtime/cilk_fiber-unix.cpp      \
  runtime/cilk_malloc.c            \
  runtime/c_reducers.c             \
  runtime/except-gcc.cpp           \
  runtime/frame_malloc.c           \
  runtime/full_frame.c             \
  runtime/global_state.cpp         \
  runtime/jmpbuf.c                 \
  runtime/local_state.c            \
  runtime/metacall_impl.c          \
  runtime/os_mutex-unix.c          \
  runtime/os-unix.c                \
  runtime/pedigrees.c              \
  runtime/record-replay.cpp        \
  runtime/reducer_impl.cpp         \
  runtime/scheduler.c              \
  runtime/signal_node.c            \
  runtime/spin_mutex.c             \
  runtime/stats.c                  \
  runtime/symbol_test.c            \
  runtime/sysdep-unix.c            \
  runtime/worker_mutex.c

# Load the $(REVISION) value.
include include/internal/rev.mk

libcilkrts_la_LDFLAGS  = -rpath '$(libdir)'
libcilkrts_la_LDFLAGS += -version-info 5:$(CILK_REVISION):0
libcilkrts_la_LDFLAGS += -lpthread -ldl

# Hack for Cygwin
libcilkrts_la_LDFLAGS += -no-undefined

# C/C++ header files for Cilk.
cilkincludedir = $(includedir)/cilk
cilkinclude_HEADERS =              \
  include/cilk/cilk_api.h          \
  include/cilk/cilk_api_linux.h    \
  include/cilk/cilk.h              \
  include/cilk/cilk_stub.h         \
  include/cilk/cilk_undocumented.h \
  include/cilk/common.h            \
  include/cilk/holder.h            \
  include/cilk/hyperobject_base.h  \
  include/cilk/metaprogramming.h   \
  include/cilk/reducer_file.h      \
  include/cilk/reducer.h           \
  include/cilk/reducer_list.h      \
  include/cilk/reducer_max.h       \
  include/cilk/reducer_min.h       \
  include/cilk/reducer_min_max.h   \
  include/cilk/reducer_opadd.h     \
  include/cilk/reducer_opand.h     \
  include/cilk/reducer_opmul.h     \
  include/cilk/reducer_opor.h      \
  include/cilk/reducer_opxor.h     \
  include/cilk/reducer_ostream.h   \
  include/cilk/reducer_string.h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with using multilib for Cilk Library
  2013-07-19 18:22 Help with using multilib for Cilk Library Iyer, Balaji V
@ 2013-07-19 22:26 ` Ian Lance Taylor
  2013-07-19 22:53   ` Iyer, Balaji V
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Lance Taylor @ 2013-07-19 22:26 UTC (permalink / raw)
  To: Iyer, Balaji V; +Cc: gcc

On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V
<balaji.v.iyer@intel.com> wrote:
> Hello Everyone,
>         I am trying to use Multilib on Cilk Library. I looked at this website (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer and libgo as samples to model after. It is currently failing with the following error message:
>
> libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++ -I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -I/export/users/my-files/gcc/libstdc++-v3/libsupc++ -I/export/users/my-files/gcc/libstdc++-v3/include/backward -I/export/users/my-files/gcc/libstdc++-v3/testsuite/util -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/bin/ -B/export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/sys-include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o /export/users/my-files/b-gcc-multilib/./gcc/32/crtbeginS.o  .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk-for.o .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o .libs/c_reducers.o .libs/except-gcc.o .libs/frame_malloc.o .libs/full_frame.o .libs/global_state.o .libs/jmpbuf.o .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -Wl,-rpath -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64 -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib -L/usr/lib/../lib -L/export/users/my-files/b-gcc-multilib/./gcc /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc -lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o .libs/libcilkrts.so.5.0.3511
> /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong format
> collect2: error: ld returned 1 exit status
> make[4]: *** [libcilkrts.la] Error 1
> make[4]: Leaving directory `/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libcilkrts'
> make[3]: *** [multi-do] Error 1
> make[3]: Leaving directory `/export/users/my-files/b-gcc
>
>
> From what it looks like, it is reading the 64 bit library for the 32 bit mode (or vice-versa). How do I fix this? I am also attaching my configure.ac and Makefile.am. Please note that it is not fully cleaned up (e.g. I have stuff commented out etc). Can someone please tell me what I am doing wrong?

When building the 32bit libcillkrts you are linking against the 64-bit
libstdc++.  It's right there on your command line:
/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.
 If that argument is needed at all, it needs to be
/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++.so
(note added /32 in there).  I guess the question is where the argument
is coming from.  I must admit that I don't know.  Is it in some
environment variable?

Ian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Help with using multilib for Cilk Library
  2013-07-19 22:26 ` Ian Lance Taylor
@ 2013-07-19 22:53   ` Iyer, Balaji V
  2013-07-19 22:56     ` H.J. Lu
  2013-07-19 23:06     ` Ian Lance Taylor
  0 siblings, 2 replies; 10+ messages in thread
From: Iyer, Balaji V @ 2013-07-19 22:53 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc



> -----Original Message-----
> From: Ian Lance Taylor [mailto:iant@google.com]
> Sent: Friday, July 19, 2013 6:26 PM
> To: Iyer, Balaji V
> Cc: gcc@gcc.gnu.org
> Subject: Re: Help with using multilib for Cilk Library
> 
> On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> > Hello Everyone,
> >         I am trying to use Multilib on Cilk Library. I looked at this website
> (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer and
> libgo as samples to model after. It is currently failing with the following error
> message:
> >
> > libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -
> B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++ -
> I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-
> v3/include/x86_64-unknown-linux-gnu -I/export/users/my-files/b-gcc-
> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -
> I/export/users/my-files/gcc/libstdc++-v3/libsupc++ -I/export/users/my-
> files/gcc/libstdc++-v3/include/backward -I/export/users/my-files/gcc/libstdc++-
> v3/testsuite/util -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
> gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-
> unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/users/my-files/install-
> gcc-multilib/x86_64-unknown-linux-gnu/bin/ -B/export/users/my-files/install-
> gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-
> files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem
> /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/sys-
> include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o /export/users/my-files/b-
> gcc-multilib/./gcc/32/crtbeginS.o  .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk-
> for.o .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o
> .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o .libs/c_reducers.o
> .libs/except-gcc.o .libs/frame_malloc.o .libs/full_frame.o .libs/global_state.o
> .libs/jmpbuf.o .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o
> .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o
> .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o
> .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -
> Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
> v3/src/.libs -Wl,-rpath -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64
> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
> v3/src/.libs -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
> gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-
> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-
> files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -
> L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib -L/usr/lib/../lib -
> L/export/users/my-files/b-gcc-multilib/./gcc /export/users/my-files/b-gcc-
> multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc -
> lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o
> /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o
> .libs/libcilkrts.so.5.0.3511
> > /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc
> > ++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong
> > format
> > collect2: error: ld returned 1 exit status
> > make[4]: *** [libcilkrts.la] Error 1
> > make[4]: Leaving directory `/export/users/my-files/b-gcc-multilib/x86_64-
> unknown-linux-gnu/32/libcilkrts'
> > make[3]: *** [multi-do] Error 1
> > make[3]: Leaving directory `/export/users/my-files/b-gcc
> >
> >
> > From what it looks like, it is reading the 64 bit library for the 32 bit mode (or
> vice-versa). How do I fix this? I am also attaching my configure.ac and
> Makefile.am. Please note that it is not fully cleaned up (e.g. I have stuff
> commented out etc). Can someone please tell me what I am doing wrong?
> 
> When building the 32bit libcillkrts you are linking against the 64-bit
> libstdc++.  It's right there on your command line:
> /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
> v3/src/.libs/libstdc++.so.
>  If that argument is needed at all, it needs to be /export/users/my-files/b-gcc-
> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++.so
> (note added /32 in there).  I guess the question is where the argument is coming
> from.  I must admit that I don't know.  Is it in some environment variable?

I am not setting any environment variable that weren't set automatically in my SUSE machine. Also, all the other libs are working correctly for 32 and 64 bit.

> 
> Ian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with using multilib for Cilk Library
  2013-07-19 22:53   ` Iyer, Balaji V
@ 2013-07-19 22:56     ` H.J. Lu
  2013-07-22 16:28       ` Iyer, Balaji V
  2013-07-19 23:06     ` Ian Lance Taylor
  1 sibling, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2013-07-19 22:56 UTC (permalink / raw)
  To: Iyer, Balaji V; +Cc: Ian Lance Taylor, gcc

On Fri, Jul 19, 2013 at 3:53 PM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: Ian Lance Taylor [mailto:iant@google.com]
>> Sent: Friday, July 19, 2013 6:26 PM
>> To: Iyer, Balaji V
>> Cc: gcc@gcc.gnu.org
>> Subject: Re: Help with using multilib for Cilk Library
>>
>> On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
>> > Hello Everyone,
>> >         I am trying to use Multilib on Cilk Library. I looked at this website
>> (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer and
>> libgo as samples to model after. It is currently failing with the following error
>> message:
>> >
>> > libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -
>> B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++ -
>> I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-
>> v3/include/x86_64-unknown-linux-gnu -I/export/users/my-files/b-gcc-
>> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -
>> I/export/users/my-files/gcc/libstdc++-v3/libsupc++ -I/export/users/my-
>> files/gcc/libstdc++-v3/include/backward -I/export/users/my-files/gcc/libstdc++-
>> v3/testsuite/util -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
>> gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-
>> unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/users/my-files/install-
>> gcc-multilib/x86_64-unknown-linux-gnu/bin/ -B/export/users/my-files/install-
>> gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-
>> files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem
>> /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/sys-
>> include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o /export/users/my-files/b-
>> gcc-multilib/./gcc/32/crtbeginS.o  .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk-
>> for.o .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o
>> .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o .libs/c_reducers.o
>> .libs/except-gcc.o .libs/frame_malloc.o .libs/full_frame.o .libs/global_state.o
>> .libs/jmpbuf.o .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o
>> .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o
>> .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o
>> .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -
>> Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
>> v3/src/.libs -Wl,-rpath -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64
>> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
>> v3/src/.libs -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
>> gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-
>> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-
>> files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -
>> L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib -L/usr/lib/../lib -
>> L/export/users/my-files/b-gcc-multilib/./gcc /export/users/my-files/b-gcc-
>> multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc -
>> lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o
>> /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o
>> .libs/libcilkrts.so.5.0.3511
>> > /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc
>> > ++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong
>> > format
>> > collect2: error: ld returned 1 exit status
>> > make[4]: *** [libcilkrts.la] Error 1
>> > make[4]: Leaving directory `/export/users/my-files/b-gcc-multilib/x86_64-
>> unknown-linux-gnu/32/libcilkrts'
>> > make[3]: *** [multi-do] Error 1
>> > make[3]: Leaving directory `/export/users/my-files/b-gcc
>> >
>> >
>> > From what it looks like, it is reading the 64 bit library for the 32 bit mode (or
>> vice-versa). How do I fix this? I am also attaching my configure.ac and
>> Makefile.am. Please note that it is not fully cleaned up (e.g. I have stuff
>> commented out etc). Can someone please tell me what I am doing wrong?
>>
>> When building the 32bit libcillkrts you are linking against the 64-bit
>> libstdc++.  It's right there on your command line:
>> /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
>> v3/src/.libs/libstdc++.so.
>>  If that argument is needed at all, it needs to be /export/users/my-files/b-gcc-
>> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++.so
>> (note added /32 in there).  I guess the question is where the argument is coming
>> from.  I must admit that I don't know.  Is it in some environment variable?
>
> I am not setting any environment variable that weren't set automatically in my SUSE machine. Also, all the other libs are working correctly for 32 and 64 bit.
>

If you can create a git branch, others can take a look to
see what is going on.  There isn't sufficient info to tell.

--
H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with using multilib for Cilk Library
  2013-07-19 22:53   ` Iyer, Balaji V
  2013-07-19 22:56     ` H.J. Lu
@ 2013-07-19 23:06     ` Ian Lance Taylor
  1 sibling, 0 replies; 10+ messages in thread
From: Ian Lance Taylor @ 2013-07-19 23:06 UTC (permalink / raw)
  To: Iyer, Balaji V; +Cc: gcc

On Fri, Jul 19, 2013 at 3:53 PM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: Ian Lance Taylor [mailto:iant@google.com]
>> Sent: Friday, July 19, 2013 6:26 PM
>> To: Iyer, Balaji V
>> Cc: gcc@gcc.gnu.org
>> Subject: Re: Help with using multilib for Cilk Library
>>
>> On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
>> > Hello Everyone,
>> >         I am trying to use Multilib on Cilk Library. I looked at this website
>> (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer and
>> libgo as samples to model after. It is currently failing with the following error
>> message:
>> >
>> > libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -
>> B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++ -
>> I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-
>> v3/include/x86_64-unknown-linux-gnu -I/export/users/my-files/b-gcc-
>> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -
>> I/export/users/my-files/gcc/libstdc++-v3/libsupc++ -I/export/users/my-
>> files/gcc/libstdc++-v3/include/backward -I/export/users/my-files/gcc/libstdc++-
>> v3/testsuite/util -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
>> gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-
>> unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/users/my-files/install-
>> gcc-multilib/x86_64-unknown-linux-gnu/bin/ -B/export/users/my-files/install-
>> gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-
>> files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem
>> /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/sys-
>> include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o /export/users/my-files/b-
>> gcc-multilib/./gcc/32/crtbeginS.o  .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk-
>> for.o .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o
>> .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o .libs/c_reducers.o
>> .libs/except-gcc.o .libs/frame_malloc.o .libs/full_frame.o .libs/global_state.o
>> .libs/jmpbuf.o .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o
>> .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o
>> .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o
>> .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -
>> Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
>> v3/src/.libs -Wl,-rpath -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64
>> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
>> v3/src/.libs -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
>> gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-
>> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-
>> files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -
>> L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib -L/usr/lib/../lib -
>> L/export/users/my-files/b-gcc-multilib/./gcc /export/users/my-files/b-gcc-
>> multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc -
>> lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o
>> /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o
>> .libs/libcilkrts.so.5.0.3511
>> > /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc
>> > ++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong
>> > format
>> > collect2: error: ld returned 1 exit status
>> > make[4]: *** [libcilkrts.la] Error 1
>> > make[4]: Leaving directory `/export/users/my-files/b-gcc-multilib/x86_64-
>> unknown-linux-gnu/32/libcilkrts'
>> > make[3]: *** [multi-do] Error 1
>> > make[3]: Leaving directory `/export/users/my-files/b-gcc
>> >
>> >
>> > From what it looks like, it is reading the 64 bit library for the 32 bit mode (or
>> vice-versa). How do I fix this? I am also attaching my configure.ac and
>> Makefile.am. Please note that it is not fully cleaned up (e.g. I have stuff
>> commented out etc). Can someone please tell me what I am doing wrong?
>>
>> When building the 32bit libcillkrts you are linking against the 64-bit
>> libstdc++.  It's right there on your command line:
>> /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-
>> v3/src/.libs/libstdc++.so.
>>  If that argument is needed at all, it needs to be /export/users/my-files/b-gcc-
>> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++.so
>> (note added /32 in there).  I guess the question is where the argument is coming
>> from.  I must admit that I don't know.  Is it in some environment variable?
>
> I am not setting any environment variable that weren't set automatically in my SUSE machine.

OK.

> Also, all the other libs are working correctly for 32 and 64 bit.

That doesn't prove much one way or another, as the other libraries are
not written in C++.  Something is adding that explicit libstdc++.so
argument, but I don't know what.  I don't see it in your
configure/Makefile and I don't see it in the top-level
configure/Makefile either.  It could possibly be coming from libtool,
but I'm not sure how.

Ian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Help with using multilib for Cilk Library
  2013-07-19 22:56     ` H.J. Lu
@ 2013-07-22 16:28       ` Iyer, Balaji V
  2013-07-22 21:07         ` H.J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Iyer, Balaji V @ 2013-07-22 16:28 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Ian Lance Taylor, gcc



> -----Original Message-----
> From: H.J. Lu [mailto:hjl.tools@gmail.com]
> Sent: Friday, July 19, 2013 6:56 PM
> To: Iyer, Balaji V
> Cc: Ian Lance Taylor; gcc@gcc.gnu.org
> Subject: Re: Help with using multilib for Cilk Library
> 
> On Fri, Jul 19, 2013 at 3:53 PM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Ian Lance Taylor [mailto:iant@google.com]
> >> Sent: Friday, July 19, 2013 6:26 PM
> >> To: Iyer, Balaji V
> >> Cc: gcc@gcc.gnu.org
> >> Subject: Re: Help with using multilib for Cilk Library
> >>
> >> On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V <balaji.v.iyer@intel.com>
> wrote:
> >> > Hello Everyone,
> >> >         I am trying to use Multilib on Cilk Library. I looked at
> >> > this website
> >> (http://www.airs.com/ian/configure/configure_8.html) and used
> >> libsanitizer and libgo as samples to model after. It is currently
> >> failing with the following error
> >> message:
> >> >
> >> > libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -
> >> B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++
> >> -
> >> I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/li
> >> bstdc++- v3/include/x86_64-unknown-linux-gnu
> >> -I/export/users/my-files/b-gcc-
> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -
> >> I/export/users/my-files/gcc/libstdc++-v3/libsupc++
> >> -I/export/users/my- files/gcc/libstdc++-v3/include/backward
> >> -I/export/users/my-files/gcc/libstdc++-
> >> v3/testsuite/util
> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
> >> gnu/32/libstdc++-v3/src
> >> -L/export/users/my-files/b-gcc-multilib/x86_64-
> >> unknown-linux-gnu/32/libstdc++-v3/src/.libs
> >> -B/export/users/my-files/install-
> >> gcc-multilib/x86_64-unknown-linux-gnu/bin/
> >> -B/export/users/my-files/install-
> >> gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-
> >> files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem
> >> /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/
> >> sys- include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o
> >> /export/users/my-files/b- gcc-multilib/./gcc/32/crtbeginS.o
> >> .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk- for.o
> >> .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o
> >> .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o
> >> .libs/c_reducers.o .libs/except-gcc.o .libs/frame_malloc.o
> >> .libs/full_frame.o .libs/global_state.o .libs/jmpbuf.o
> >> .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o
> >> .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o
> .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o
> >> .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -
> >> Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/lib
> >> stdc++- v3/src/.libs -Wl,-rpath
> >> -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64
> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libs
> >> tdc++- v3/src/.libs
> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
> >> gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-
> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src
> >> -L/export/users/my-
> >> files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.li
> >> bs -
> >> L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib
> >> -L/usr/lib/../lib - L/export/users/my-files/b-gcc-multilib/./gcc
> >> /export/users/my-files/b-gcc-
> >> multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc
> - lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o
> >> /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o
> >> .libs/libcilkrts.so.5.0.3511
> >> > /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libs
> >> > tdc
> >> > ++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong
> >> > format
> >> > collect2: error: ld returned 1 exit status
> >> > make[4]: *** [libcilkrts.la] Error 1
> >> > make[4]: Leaving directory
> >> > `/export/users/my-files/b-gcc-multilib/x86_64-
> >> unknown-linux-gnu/32/libcilkrts'
> >> > make[3]: *** [multi-do] Error 1
> >> > make[3]: Leaving directory `/export/users/my-files/b-gcc
> >> >
> >> >
> >> > From what it looks like, it is reading the 64 bit library for the
> >> > 32 bit mode (or
> >> vice-versa). How do I fix this? I am also attaching my configure.ac
> >> and Makefile.am. Please note that it is not fully cleaned up (e.g. I
> >> have stuff commented out etc). Can someone please tell me what I am doing
> wrong?
> >>
> >> When building the 32bit libcillkrts you are linking against the
> >> 64-bit
> >> libstdc++.  It's right there on your command line:
> >> /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstd
> >> c++-
> >> v3/src/.libs/libstdc++.so.
> >>  If that argument is needed at all, it needs to be
> >> /export/users/my-files/b-gcc-
> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++
> >> .so (note added /32 in there).  I guess the question is where the
> >> argument is coming from.  I must admit that I don't know.  Is it in
> >> some environment variable?
> >
> > I am not setting any environment variable that weren't set automatically in my
> SUSE machine. Also, all the other libs are working correctly for 32 and 64 bit.
> >
> 
> If you can create a git branch, others can take a look to see what is going on.
> There isn't sufficient info to tell.

Hello H. J. and Ian,
	I have posted what I have in bviyer/cilkplus-multilib-test. To build the compiler, I used the following configure command:

../cilkplus-multilib-test/configure --prefix=<INSTALL_DIR>

Any help is greatly appreciated!

Thanks,

Balaji V. Iyer.

> 
> --
> H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with using multilib for Cilk Library
  2013-07-22 16:28       ` Iyer, Balaji V
@ 2013-07-22 21:07         ` H.J. Lu
  2013-07-23 16:33           ` Iyer, Balaji V
  0 siblings, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2013-07-22 21:07 UTC (permalink / raw)
  To: Iyer, Balaji V; +Cc: Ian Lance Taylor, gcc

[-- Attachment #1: Type: text/plain, Size: 6278 bytes --]

On Mon, Jul 22, 2013 at 9:27 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: H.J. Lu [mailto:hjl.tools@gmail.com]
>> Sent: Friday, July 19, 2013 6:56 PM
>> To: Iyer, Balaji V
>> Cc: Ian Lance Taylor; gcc@gcc.gnu.org
>> Subject: Re: Help with using multilib for Cilk Library
>>
>> On Fri, Jul 19, 2013 at 3:53 PM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
>> >
>> >
>> >> -----Original Message-----
>> >> From: Ian Lance Taylor [mailto:iant@google.com]
>> >> Sent: Friday, July 19, 2013 6:26 PM
>> >> To: Iyer, Balaji V
>> >> Cc: gcc@gcc.gnu.org
>> >> Subject: Re: Help with using multilib for Cilk Library
>> >>
>> >> On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V <balaji.v.iyer@intel.com>
>> wrote:
>> >> > Hello Everyone,
>> >> >         I am trying to use Multilib on Cilk Library. I looked at
>> >> > this website
>> >> (http://www.airs.com/ian/configure/configure_8.html) and used
>> >> libsanitizer and libgo as samples to model after. It is currently
>> >> failing with the following error
>> >> message:
>> >> >
>> >> > libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -
>> >> B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++
>> >> -
>> >> I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/li
>> >> bstdc++- v3/include/x86_64-unknown-linux-gnu
>> >> -I/export/users/my-files/b-gcc-
>> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -
>> >> I/export/users/my-files/gcc/libstdc++-v3/libsupc++
>> >> -I/export/users/my- files/gcc/libstdc++-v3/include/backward
>> >> -I/export/users/my-files/gcc/libstdc++-
>> >> v3/testsuite/util
>> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
>> >> gnu/32/libstdc++-v3/src
>> >> -L/export/users/my-files/b-gcc-multilib/x86_64-
>> >> unknown-linux-gnu/32/libstdc++-v3/src/.libs
>> >> -B/export/users/my-files/install-
>> >> gcc-multilib/x86_64-unknown-linux-gnu/bin/
>> >> -B/export/users/my-files/install-
>> >> gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-
>> >> files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem
>> >> /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/
>> >> sys- include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o
>> >> /export/users/my-files/b- gcc-multilib/./gcc/32/crtbeginS.o
>> >> .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk- for.o
>> >> .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o
>> >> .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o
>> >> .libs/c_reducers.o .libs/except-gcc.o .libs/frame_malloc.o
>> >> .libs/full_frame.o .libs/global_state.o .libs/jmpbuf.o
>> >> .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o
>> >> .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o
>> .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o
>> >> .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -
>> >> Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/lib
>> >> stdc++- v3/src/.libs -Wl,-rpath
>> >> -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64
>> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libs
>> >> tdc++- v3/src/.libs
>> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
>> >> gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-
>> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src
>> >> -L/export/users/my-
>> >> files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.li
>> >> bs -
>> >> L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib
>> >> -L/usr/lib/../lib - L/export/users/my-files/b-gcc-multilib/./gcc
>> >> /export/users/my-files/b-gcc-
>> >> multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc
>> - lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o
>> >> /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o
>> >> .libs/libcilkrts.so.5.0.3511
>> >> > /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libs
>> >> > tdc
>> >> > ++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong
>> >> > format
>> >> > collect2: error: ld returned 1 exit status
>> >> > make[4]: *** [libcilkrts.la] Error 1
>> >> > make[4]: Leaving directory
>> >> > `/export/users/my-files/b-gcc-multilib/x86_64-
>> >> unknown-linux-gnu/32/libcilkrts'
>> >> > make[3]: *** [multi-do] Error 1
>> >> > make[3]: Leaving directory `/export/users/my-files/b-gcc
>> >> >
>> >> >
>> >> > From what it looks like, it is reading the 64 bit library for the
>> >> > 32 bit mode (or
>> >> vice-versa). How do I fix this? I am also attaching my configure.ac
>> >> and Makefile.am. Please note that it is not fully cleaned up (e.g. I
>> >> have stuff commented out etc). Can someone please tell me what I am doing
>> wrong?
>> >>
>> >> When building the 32bit libcillkrts you are linking against the
>> >> 64-bit
>> >> libstdc++.  It's right there on your command line:
>> >> /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstd
>> >> c++-
>> >> v3/src/.libs/libstdc++.so.
>> >>  If that argument is needed at all, it needs to be
>> >> /export/users/my-files/b-gcc-
>> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++
>> >> .so (note added /32 in there).  I guess the question is where the
>> >> argument is coming from.  I must admit that I don't know.  Is it in
>> >> some environment variable?
>> >
>> > I am not setting any environment variable that weren't set automatically in my
>> SUSE machine. Also, all the other libs are working correctly for 32 and 64 bit.
>> >
>>
>> If you can create a git branch, others can take a look to see what is going on.
>> There isn't sufficient info to tell.
>
> Hello H. J. and Ian,
>         I have posted what I have in bviyer/cilkplus-multilib-test. To build the compiler, I used the following configure command:
>
> ../cilkplus-multilib-test/configure --prefix=<INSTALL_DIR>
>
> Any help is greatly appreciated!
>
> Thanks,
>
> Balaji V. Iyer.

Here is a patch:

1. Add target dependency on C++ for parallel build.
2. Remove hardcoded -O3 -fpic. libtool takes care of it.
3. Work around MAKEFLAGS for multilib build.


--
H.J.

[-- Attachment #2: libcilkrts.patch --]
[-- Type: application/octet-stream, Size: 3540 bytes --]

diff --git a/Makefile.def b/Makefile.def
index 90d9653..d8e4c79 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -123,6 +123,8 @@ target_modules = { module= libsanitizer;
 		   bootstrap=true;
 		   lib_path=.libs;
 		   raw_cxx=true; };
+target_modules = { module= libcilkrts;
+		   lib_path=.libs; };
 target_modules = { module= libssp; lib_path=.libs; };
 target_modules = { module= newlib; };
 target_modules = { module= libgcc; bootstrap=true; no_check=true; };
@@ -489,6 +491,7 @@ dependencies = { module=all-m4; on=all-build-texinfo; };
 // on libgcc and newlib/libgloss.
 lang_env_dependencies = { module=libjava; cxx=true; };
 lang_env_dependencies = { module=libitm; cxx=true; };
+lang_env_dependencies = { module=libcilkrts; cxx=true; };
 lang_env_dependencies = { module=newlib; no_c=true; };
 lang_env_dependencies = { module=libgloss; no_c=true; };
 lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; };
@@ -526,6 +529,8 @@ dependencies = { module=install-target-libgfortran; on=install-target-libquadmat
 dependencies = { module=install-target-libgfortran; on=install-target-libgcc; };
 dependencies = { module=install-target-libsanitizer; on=install-target-libstdc++-v3; };
 dependencies = { module=install-target-libsanitizer; on=install-target-libgcc; };
+dependencies = { module=install-target-libcilkrts; on=install-target-libstdc++-v3; };
+dependencies = { module=install-target-libcilkrts; on=install-target-libgcc; };
 dependencies = { module=install-target-libjava; on=install-target-libgcc; };
 dependencies = { module=install-target-libitm; on=install-target-libgcc; };
 dependencies = { module=install-target-libobjc; on=install-target-libgcc; };
diff --git a/libcilkrts/Makefile.am b/libcilkrts/Makefile.am
index ac93498..12ecd36 100644
--- a/libcilkrts/Makefile.am
+++ b/libcilkrts/Makefile.am
@@ -26,7 +26,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # Compiler and linker flags.
 GENERAL_FLAGS = -I$(top_srcdir)/include -DIN_CILK_RUNTIME=1
-GENERAL_FLAGS += -fpic -O3 -fcilkplus
+GENERAL_FLAGS += -fcilkplus
 GENERAL_FLAGS += -DBUILD_USER=\"$(USER)\"
 GENERAL_FLAGS += -DBUILD_HOST=\"`hostname`\"
 AM_CFLAGS = $(GENERAL_FLAGS) -std=c99
@@ -75,3 +75,43 @@ cilkinclude_HEADERS =              \
   include/cilk/reducer_opxor.h     \
   include/cilk/reducer_ostream.h   \
   include/cilk/reducer_string.h
+
+# Work around what appears to be a GNU make bug handling MAKEFLAGS
+# values defined in terms of make variables, as is the case for CC and
+# friends when we are called from the top level Makefile.
+AM_MAKEFLAGS = \
+	"AR_FLAGS=$(AR_FLAGS)" \
+	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+	"CFLAGS=$(CFLAGS)" \
+	"CXXFLAGS=$(CXXFLAGS)" \
+	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+	"INSTALL=$(INSTALL)" \
+	"INSTALL_DATA=$(INSTALL_DATA)" \
+	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+	"JC1FLAGS=$(JC1FLAGS)" \
+	"LDFLAGS=$(LDFLAGS)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+	"MAKE=$(MAKE)" \
+	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+	"PICFLAG=$(PICFLAG)" \
+	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+	"SHELL=$(SHELL)" \
+	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+	"exec_prefix=$(exec_prefix)" \
+	"infodir=$(infodir)" \
+	"libdir=$(libdir)" \
+	"prefix=$(prefix)" \
+	"includedir=$(includedir)" \
+	"AR=$(AR)" \
+	"AS=$(AS)" \
+	"LD=$(LD)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"NM=$(NM)" \
+	"PICFLAG=$(PICFLAG)" \
+	"RANLIB=$(RANLIB)" \
+	"DESTDIR=$(DESTDIR)"
+
+MAKEOVERRIDES=

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Help with using multilib for Cilk Library
  2013-07-22 21:07         ` H.J. Lu
@ 2013-07-23 16:33           ` Iyer, Balaji V
  2013-07-23 17:03             ` H.J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Iyer, Balaji V @ 2013-07-23 16:33 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Ian Lance Taylor, gcc



> -----Original Message-----
> From: H.J. Lu [mailto:hjl.tools@gmail.com]
> Sent: Monday, July 22, 2013 5:08 PM
> To: Iyer, Balaji V
> Cc: Ian Lance Taylor; gcc@gcc.gnu.org
> Subject: Re: Help with using multilib for Cilk Library
> 
> On Mon, Jul 22, 2013 at 9:27 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: H.J. Lu [mailto:hjl.tools@gmail.com]
> >> Sent: Friday, July 19, 2013 6:56 PM
> >> To: Iyer, Balaji V
> >> Cc: Ian Lance Taylor; gcc@gcc.gnu.org
> >> Subject: Re: Help with using multilib for Cilk Library
> >>
> >> On Fri, Jul 19, 2013 at 3:53 PM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: Ian Lance Taylor [mailto:iant@google.com]
> >> >> Sent: Friday, July 19, 2013 6:26 PM
> >> >> To: Iyer, Balaji V
> >> >> Cc: gcc@gcc.gnu.org
> >> >> Subject: Re: Help with using multilib for Cilk Library
> >> >>
> >> >> On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V
> >> >> <balaji.v.iyer@intel.com>
> >> wrote:
> >> >> > Hello Everyone,
> >> >> >         I am trying to use Multilib on Cilk Library. I looked at
> >> >> > this website
> >> >> (http://www.airs.com/ian/configure/configure_8.html) and used
> >> >> libsanitizer and libgo as samples to model after. It is currently
> >> >> failing with the following error
> >> >> message:
> >> >> >
> >> >> > libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++
> >> >> > -
> >> >> B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++
> >> >> -nostdinc++
> >> >> -
> >> >> I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32
> >> >> /li
> >> >> bstdc++- v3/include/x86_64-unknown-linux-gnu
> >> >> -I/export/users/my-files/b-gcc-
> >> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -
> >> >> I/export/users/my-files/gcc/libstdc++-v3/libsupc++
> >> >> -I/export/users/my- files/gcc/libstdc++-v3/include/backward
> >> >> -I/export/users/my-files/gcc/libstdc++-
> >> >> v3/testsuite/util
> >> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
> >> >> gnu/32/libstdc++-v3/src
> >> >> -L/export/users/my-files/b-gcc-multilib/x86_64-
> >> >> unknown-linux-gnu/32/libstdc++-v3/src/.libs
> >> >> -B/export/users/my-files/install-
> >> >> gcc-multilib/x86_64-unknown-linux-gnu/bin/
> >> >> -B/export/users/my-files/install-
> >> >> gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem
> >> >> /export/users/my-
> >> >> files/install-gcc-multilib/x86_64-unknown-linux-gnu/include
> >> >> -isystem
> >> >> /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-g
> >> >> nu/
> >> >> sys- include  -m32 -shared -nostdlib /usr/lib/../lib/crti.o
> >> >> /export/users/my-files/b- gcc-multilib/./gcc/32/crtbeginS.o
> >> >> .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk- for.o
> >> >> .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o
> >> >> .libs/cilk_api.o .libs/cilk_fiber.o .libs/cilk_fiber-unix.o
> >> >> .libs/cilk_malloc.o .libs/c_reducers.o .libs/except-gcc.o
> >> >> .libs/frame_malloc.o .libs/full_frame.o .libs/global_state.o
> >> >> .libs/jmpbuf.o .libs/local_state.o .libs/metacall_impl.o
> >> >> .libs/os_mutex-unix.o .libs/os-unix.o .libs/pedigrees.o
> >> >> .libs/record-replay.o .libs/reducer_impl.o
> >> .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o
> >> .libs/stats.o
> >> >> .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o   -Wl,-rpath -
> >> >> Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/
> >> >> lib
> >> >> stdc++- v3/src/.libs -Wl,-rpath
> >> >> -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64
> >> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/l
> >> >> ibs
> >> >> tdc++- v3/src/.libs
> >> >> -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-
> >> >> gnu/libstdc++-v3/src -lpthread -ldl
> >> >> -L/export/users/my-files/b-gcc-
> >> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src
> >> >> -L/export/users/my-
> >> >> files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/
> >> >> .li
> >> >> bs -
> >> >> L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib
> >> >> -L/usr/lib/../lib - L/export/users/my-files/b-gcc-multilib/./gcc
> >> >> /export/users/my-files/b-gcc-
> >> >> multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++
> >> >> .so -lm -lc
> >> - lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o
> >> >> /usr/lib/../lib/crtn.o  -m32 -m32   -Wl,-soname -Wl,libcilkrts.so.5 -o
> >> >> .libs/libcilkrts.so.5.0.3511
> >> >> > /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/l
> >> >> > ibs
> >> >> > tdc
> >> >> > ++-v3/src/.libs/libstdc++.so: could not read symbols: File in
> >> >> > ++wrong
> >> >> > format
> >> >> > collect2: error: ld returned 1 exit status
> >> >> > make[4]: *** [libcilkrts.la] Error 1
> >> >> > make[4]: Leaving directory
> >> >> > `/export/users/my-files/b-gcc-multilib/x86_64-
> >> >> unknown-linux-gnu/32/libcilkrts'
> >> >> > make[3]: *** [multi-do] Error 1
> >> >> > make[3]: Leaving directory `/export/users/my-files/b-gcc
> >> >> >
> >> >> >
> >> >> > From what it looks like, it is reading the 64 bit library for
> >> >> > the
> >> >> > 32 bit mode (or
> >> >> vice-versa). How do I fix this? I am also attaching my
> >> >> configure.ac and Makefile.am. Please note that it is not fully
> >> >> cleaned up (e.g. I have stuff commented out etc). Can someone
> >> >> please tell me what I am doing
> >> wrong?
> >> >>
> >> >> When building the 32bit libcillkrts you are linking against the
> >> >> 64-bit
> >> >> libstdc++.  It's right there on your command line:
> >> >> /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/lib
> >> >> std
> >> >> c++-
> >> >> v3/src/.libs/libstdc++.so.
> >> >>  If that argument is needed at all, it needs to be
> >> >> /export/users/my-files/b-gcc-
> >> >> multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs/libstd
> >> >> c++ .so (note added /32 in there).  I guess the question is where
> >> >> the argument is coming from.  I must admit that I don't know.  Is
> >> >> it in some environment variable?
> >> >
> >> > I am not setting any environment variable that weren't set
> >> > automatically in my
> >> SUSE machine. Also, all the other libs are working correctly for 32 and 64 bit.
> >> >
> >>
> >> If you can create a git branch, others can take a look to see what is going on.
> >> There isn't sufficient info to tell.
> >
> > Hello H. J. and Ian,
> >         I have posted what I have in bviyer/cilkplus-multilib-test. To build the
> compiler, I used the following configure command:
> >
> > ../cilkplus-multilib-test/configure --prefix=<INSTALL_DIR>
> >
> > Any help is greatly appreciated!
> >
> > Thanks,
> >
> > Balaji V. Iyer.
> 
> Here is a patch:
> 
> 1. Add target dependency on C++ for parallel build.
> 2. Remove hardcoded -O3 -fpic. libtool takes care of it.
> 3. Work around MAKEFLAGS for multilib build.
> 

Hi H.J.,
	Thank you! This patch got rid of all the errors for me. When I do make install, it is installing both the 32 bit one and 64 bit one in $INSTALL_DIR/lib. How can I make the 32 bit one write to $INSTALL_DIR/lib and the 64-bit one write to $INSTALL_DIR/lib64?

Thanks,

Balaji V. Iyer.

> 
> --
> H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Help with using multilib for Cilk Library
  2013-07-23 16:33           ` Iyer, Balaji V
@ 2013-07-23 17:03             ` H.J. Lu
  2013-07-23 21:24               ` Iyer, Balaji V
  0 siblings, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2013-07-23 17:03 UTC (permalink / raw)
  To: Iyer, Balaji V; +Cc: Ian Lance Taylor, gcc

On Tue, Jul 23, 2013 at 9:33 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
>> Here is a patch:
>>
>> 1. Add target dependency on C++ for parallel build.
>> 2. Remove hardcoded -O3 -fpic. libtool takes care of it.
>> 3. Work around MAKEFLAGS for multilib build.
>>
>
> Hi H.J.,
>         Thank you! This patch got rid of all the errors for me. When I do make install, it is installing both the 32 bit one and 64 bit one in $INSTALL_DIR/lib. How can I make the 32 bit one write to $INSTALL_DIR/lib and the 64-bit one write to $INSTALL_DIR/lib64?
>

Try this:

 # Target list.
-lib_LTLIBRARIES = libcilkrts.la
+toolexeclib_LTLIBRARIES = libcilkrts.la

on libcilkrts/Makefile.am.

--
H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Help with using multilib for Cilk Library
  2013-07-23 17:03             ` H.J. Lu
@ 2013-07-23 21:24               ` Iyer, Balaji V
  0 siblings, 0 replies; 10+ messages in thread
From: Iyer, Balaji V @ 2013-07-23 21:24 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Ian Lance Taylor, gcc



> -----Original Message-----
> From: H.J. Lu [mailto:hjl.tools@gmail.com]
> Sent: Tuesday, July 23, 2013 1:04 PM
> To: Iyer, Balaji V
> Cc: Ian Lance Taylor; gcc@gcc.gnu.org
> Subject: Re: Help with using multilib for Cilk Library
> 
> On Tue, Jul 23, 2013 at 9:33 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> >> Here is a patch:
> >>
> >> 1. Add target dependency on C++ for parallel build.
> >> 2. Remove hardcoded -O3 -fpic. libtool takes care of it.
> >> 3. Work around MAKEFLAGS for multilib build.
> >>
> >
> > Hi H.J.,
> >         Thank you! This patch got rid of all the errors for me. When I do make
> install, it is installing both the 32 bit one and 64 bit one in $INSTALL_DIR/lib.
> How can I make the 32 bit one write to $INSTALL_DIR/lib and the 64-bit one
> write to $INSTALL_DIR/lib64?
> >
> 
> Try this:
> 
>  # Target list.
> -lib_LTLIBRARIES = libcilkrts.la
> +toolexeclib_LTLIBRARIES = libcilkrts.la
> 
> on libcilkrts/Makefile.am.

It works now! Thanks for all your help!

Thanks,

Balaji V. Iyer.

> 
> --
> H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-07-23 21:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-19 18:22 Help with using multilib for Cilk Library Iyer, Balaji V
2013-07-19 22:26 ` Ian Lance Taylor
2013-07-19 22:53   ` Iyer, Balaji V
2013-07-19 22:56     ` H.J. Lu
2013-07-22 16:28       ` Iyer, Balaji V
2013-07-22 21:07         ` H.J. Lu
2013-07-23 16:33           ` Iyer, Balaji V
2013-07-23 17:03             ` H.J. Lu
2013-07-23 21:24               ` Iyer, Balaji V
2013-07-19 23:06     ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).