Skip to content

Commit

Permalink
libcc1: DO not use @rpath processing here, it is not needed.
Browse files Browse the repository at this point in the history
It also breaks cross compiler builds when the build compiler does
not support the -nodefaultpaths option (etc.)  This is issue #18 on
the arm64 gcc-12 branch.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

libcc1/ChangeLog:

	* Makefile.am:
	* Makefile.in:
	* configure: Regenerate.
	* configure.ac:
  • Loading branch information
iains committed Aug 20, 2023
1 parent f2f062e commit cc5411c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 41 deletions.
12 changes: 0 additions & 12 deletions libcc1/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ marshall_c_source = marshall-c.hh
marshall_cxx_source = marshall-cp.hh

libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym
if ENABLE_DARWIN_AT_RPATH
libcc1plugin_la_LDFLAGS += -Wc,-nodefaultrpaths
libcc1plugin_la_LDFLAGS += -Wl,-rpath,@loader_path
endif
libcc1plugin_la_SOURCES = libcc1plugin.cc context.cc context.hh \
$(shared_source) $(marshall_c_source)
libcc1plugin.lo_CPPFLAGS = $(CPPFLAGS_FOR_C)
Expand All @@ -69,10 +65,6 @@ libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@

libcp1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcp1plugin.sym
if ENABLE_DARWIN_AT_RPATH
libcp1plugin_la_LDFLAGS += -Wc,-nodefaultrpaths
libcp1plugin_la_LDFLAGS += -Wl,-rpath,@loader_path
endif
libcp1plugin_la_SOURCES = libcp1plugin.cc context.cc context.hh \
$(shared_source) $(marshall_cxx_source)
libcp1plugin.lo_CPPFLAGS = $(CPPFLAGS_FOR_CXX)
Expand All @@ -84,10 +76,6 @@ libcp1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \

LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym
if ENABLE_DARWIN_AT_RPATH
libcc1_la_LDFLAGS += -Wc,-nodefaultrpaths
libcc1_la_LDFLAGS += -Wl,-rpath,@loader_path
endif
libcc1_la_SOURCES = findcomp.cc libcc1.cc libcp1.cc \
compiler.cc compiler.hh names.cc names.hh $(shared_source) \
$(marshall_c_source) $(marshall_cxx_source)
Expand Down
15 changes: 3 additions & 12 deletions libcc1/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@DARWIN_DYNAMIC_LOOKUP_TRUE@am__append_1 = -Wl,-undefined,dynamic_lookup
@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_2 = -Wc,-nodefaultrpaths \
@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path
@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_3 = -Wc,-nodefaultrpaths \
@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path
@ENABLE_DARWIN_AT_RPATH_TRUE@am__append_4 = -Wc,-nodefaultrpaths \
@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
Expand Down Expand Up @@ -411,8 +405,7 @@ shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \

marshall_c_source = marshall-c.hh
marshall_cxx_source = marshall-cp.hh
libcc1plugin_la_LDFLAGS = -module -export-symbols \
$(srcdir)/libcc1plugin.sym $(am__append_2)
libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym
libcc1plugin_la_SOURCES = libcc1plugin.cc context.cc context.hh \
$(shared_source) $(marshall_c_source)

Expand All @@ -423,8 +416,7 @@ libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@

libcp1plugin_la_LDFLAGS = -module -export-symbols \
$(srcdir)/libcp1plugin.sym $(am__append_3)
libcp1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcp1plugin.sym
libcp1plugin_la_SOURCES = libcp1plugin.cc context.cc context.hh \
$(shared_source) $(marshall_cxx_source)

Expand All @@ -436,8 +428,7 @@ libcp1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(CXXFLAGS) $(libcp1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@

LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym \
$(am__append_4)
libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym
libcc1_la_SOURCES = findcomp.cc libcc1.cc libcp1.cc \
compiler.cc compiler.hh names.cc names.hh $(shared_source) \
$(marshall_c_source) $(marshall_cxx_source)
Expand Down
18 changes: 2 additions & 16 deletions libcc1/configure
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,6 @@ gcc_version
get_gcc_base_ver
CET_HOST_FLAGS
visibility
ENABLE_DARWIN_AT_RPATH_FALSE
ENABLE_DARWIN_AT_RPATH_TRUE
CXXCPP
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
Expand Down Expand Up @@ -10891,7 +10889,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10894 "configure"
#line 10892 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -10997,7 +10995,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11000 "configure"
#line 10998 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -14703,14 +14701,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu


if test x$enable_darwin_at_rpath = xyes; then
ENABLE_DARWIN_AT_RPATH_TRUE=
ENABLE_DARWIN_AT_RPATH_FALSE='#'
else
ENABLE_DARWIN_AT_RPATH_TRUE='#'
ENABLE_DARWIN_AT_RPATH_FALSE=
fi


visibility=
if test "$GXX" = yes; then
Expand Down Expand Up @@ -15562,10 +15552,6 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_DARWIN_AT_RPATH_TRUE}" && test -z "${ENABLE_DARWIN_AT_RPATH_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_DARWIN_AT_RPATH\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${DARWIN_DYNAMIC_LOOKUP_TRUE}" && test -z "${DARWIN_DYNAMIC_LOOKUP_FALSE}"; then
as_fn_error $? "conditional \"DARWIN_DYNAMIC_LOOKUP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand Down
1 change: 0 additions & 1 deletion libcc1/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ AM_MAINTAINER_MODE
LT_INIT([disable-static])
AM_PROG_LIBTOOL
AC_PROG_CXX
AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes])

visibility=
if test "$GXX" = yes; then
Expand Down

0 comments on commit cc5411c

Please sign in to comment.