aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-03 14:16:59 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-03 14:16:59 +0000
commitd6400eba92de40931700f584568be9f72d258911 (patch)
treecf24b692c1a3b4105d4d0c2d499b906f348c37cd
parent844ebb30e8bbff9225c4dc3e728cfa30e6e514b7 (diff)
* configure.ac: Set srcdir when sourcing config-lang.in fragments.
* configure: Rebuilt. gcc/objcp/ * config-lang.in: Source cp/config-lang.in, sort objc++ gtfiles list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249922 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure12
-rw-r--r--configure.ac12
-rw-r--r--gcc/objcp/ChangeLog4
-rw-r--r--gcc/objcp/config-lang.in20
5 files changed, 45 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d2c0bf7faf..f0af90c07df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-03 Nathan Sidwell <nathan@acm.org>
+
+ * configure.ac: Set srcdir when sourcing config-lang.in fragments.
+ * configure: Rebuilt.
+
2017-07-03 Bernd Schmidt <bschmidt@redhat.com>
* MAINTAINERS: Readd myself for c6x.
diff --git a/configure b/configure
index 084986f475e..8559fb6e963 100755
--- a/configure
+++ b/configure
@@ -6166,7 +6166,12 @@ if test -d ${srcdir}/gcc; then
language=
lang_requires=
lang_requires_boot_languages=
- . ${lang_frag}
+ # set srcdir during sourcing lang_frag to the gcc dir.
+ # Sadly overriding srcdir on the . line doesn't work in plain sh as it
+ # polutes this shell
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
for other in ${lang_requires} ${lang_requires_boot_languages}; do
case ,${enable_languages}, in
*,$other,*) ;;
@@ -6241,7 +6246,10 @@ if test -d ${srcdir}/gcc; then
subdir_requires=
boot_language=no
build_by_default=yes
- . ${lang_frag}
+ # set srcdir during sourcing. See above about save & restore
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
if test x${language} = x; then
echo "${lang_frag} doesn't set \$language." 1>&2
exit 1
diff --git a/configure.ac b/configure.ac
index 0cf052b2c75..24645d88cf9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1839,7 +1839,12 @@ if test -d ${srcdir}/gcc; then
language=
lang_requires=
lang_requires_boot_languages=
- . ${lang_frag}
+ # set srcdir during sourcing lang_frag to the gcc dir.
+ # Sadly overriding srcdir on the . line doesn't work in plain sh as it
+ # polutes this shell
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
for other in ${lang_requires} ${lang_requires_boot_languages}; do
case ,${enable_languages}, in
*,$other,*) ;;
@@ -1914,7 +1919,10 @@ if test -d ${srcdir}/gcc; then
subdir_requires=
boot_language=no
build_by_default=yes
- . ${lang_frag}
+ # set srcdir during sourcing. See above about save & restore
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
if test x${language} = x; then
echo "${lang_frag} doesn't set \$language." 1>&2
exit 1
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
index 817b6d466f3..5b4b6bdf2f0 100644
--- a/gcc/objcp/ChangeLog
+++ b/gcc/objcp/ChangeLog
@@ -1,3 +1,7 @@
+2017-07-03 Nathan Sidwell <nathan@acm.org>
+
+ * config-lang.in: Source cp/config-lang.in, sort objc++ gtfiles list.
+
2017-06-02 Nathan Sidwell <nathan@acm.org>
* objcp-decl.h (SIZEOF_OBJC_TYPE_LANG_SPECIFIC): Use lang_type.
diff --git a/gcc/objcp/config-lang.in b/gcc/objcp/config-lang.in
index 04180947492..5d2b1de8e5a 100644
--- a/gcc/objcp/config-lang.in
+++ b/gcc/objcp/config-lang.in
@@ -43,8 +43,20 @@ subdir_requires="objc cp"
# avoid having the GC stuff from that header being added to gtype-cp.h
# or gtype-objc.h.
-# This list is separated in two parts: the first one is identical to
-# the C++ one, the second one contains our ObjC++ additions.
-gtfiles="\$(srcdir)/cp/rtti.c \$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.h \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-lex.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/cp/class.c \$(srcdir)/cp/cp-objcp-common.c \$(srcdir)/cp/except.c \$(srcdir)/cp/vtable-class-hierarchy.c \$(srcdir)/cp/constexpr.c \$(srcdir)/cp/cp-gimplify.c \
-\$(srcdir)/objc/objc-map.h \$(srcdir)/objc/objc-act.h \$(srcdir)/objc/objc-act.c \$(srcdir)/objc/objc-runtime-shared-support.c \$(srcdir)/objc/objc-gnu-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-02.c \$(srcdir)/c-family/c-cppbuiltin.c"
+# Get the C++ FE's gtfiles list. Do this in a subshell, so we can
+# extract exactly the gtfiles var, but munge cp-lang.c into objcp-lang.c.
+gtfiles="$(. $srcdir/cp/config-lang.in ; \
+ echo $gtfiles | sed 's+/cp/cp-lang.c +/objcp/objcp-lang.c +')"
+
+# Now add our special bits to it. Please keep this list sorted.
+gtfiles="$gtfiles \
+\$(srcdir)/objc/objc-act.h \
+\$(srcdir)/objc/objc-map.h \
+\$(srcdir)/c-family/c-cppbuiltin.c \
+\$(srcdir)/objc/objc-act.c \
+\$(srcdir)/objc/objc-gnu-runtime-abi-01.c \
+\$(srcdir)/objc/objc-next-runtime-abi-01.c \
+\$(srcdir)/objc/objc-next-runtime-abi-02.c \
+\$(srcdir)/objc/objc-runtime-shared-support.c \
+"