[Bug d/88431] link errors on build

2019-04-23 Thread ibuclaw at gdcproject dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88431

Iain Buclaw  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Iain Buclaw  ---
Fixed in r270531.

[Bug d/88431] link errors on build

2019-04-23 Thread ibuclaw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88431

--- Comment #4 from ibuclaw at gcc dot gnu.org ---
Author: ibuclaw
Date: Wed Apr 24 02:04:04 2019
New Revision: 270531

URL: https://gcc.gnu.org/viewcvs?rev=270531=gcc=rev
Log:
libphobos: Fix link build errors when compiling with unsupported options

The first compilation test to get baseline warnings was getting more
messages due to a missing object.d file, compared to later configure
tests where libphobos is in the include paths.

Because there must always be an object module during compilation, let
the tests themselves be an empty object module instead.

libphobos/ChangeLog:

2019-04-24  Iain Buclaw  

PR d/88431
* configure: Regenerate.
* m4/libtool.m4 (lt_simple_compile_test_code): Update to not have
dependencies on libphobos.
(lt_simple_link_test_code): Likewise.
(GDCFLAGS): Don't override for D compiler tests.

Modified:
trunk/libphobos/ChangeLog
trunk/libphobos/configure
trunk/libphobos/m4/libtool.m4

[Bug d/88431] link errors on build

2019-04-21 Thread ibuclaw at gdcproject dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88431

--- Comment #3 from Iain Buclaw  ---
Added some debug prints in the boilerplate check.

configure:12017: Checking compiler boilerplate from: $CC -o conftest$ac_exeext
$CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5
configure:12018: module mod; extern(C) int main() { return 0; }
configure:12019: Boilerplate = d21: warning: command line option '-Wlogical-op'
is valid for C/C++/ObjC/ObjC++ but not for D
d21: error: cannot find source code for runtime library file 'object.d'
d21: note: dmd might not be correctly installed. Run 'dmd -man' for
installation instructions.
d21: note: config file: not found
import path[0] = /usr/include/d


So the D boilerplate in the initial test does not match the warnings in latter
tests.

This is the problem here.

[Bug d/88431] link errors on build

2019-04-21 Thread ibuclaw at gdcproject dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88431

--- Comment #2 from Iain Buclaw  ---
(In reply to David Binderman from comment #1)
> This config line works fine:
> 
> ../trunk/configure --prefix=/home/dcb/gcc/results.266950 \
>   --disable-multilib \
>   --disable-werror \
>   --enable-checking=df,extra,fold,rtl,yes \
>   --enable-languages=d
> 
> so it looks like using -O3 in the top level Makefile causes trouble.

I see the following in the config.cache for libphobos:

lt_cv_prog_compiler_pic_works=${lt_cv_prog_compiler_pic_works=yes}
lt_cv_prog_compiler_pic_works_D=${lt_cv_prog_compiler_pic_works_D=no}


config.log:

configure:12414: checking if ./gcc/gdc -B./gcc/ PIC flag -fPIC works
configure:12432: ./gcc/gdc -B./gcc/ -c -nophoboslib -fno-moduleinfo -nostdinc
-g -O3 -march=native -Wlogical-op  -fPIC conftest.d >&5
d21: warning: command line option '-Wlogical-op' is valid for C/C++/ObjC/ObjC++
but not for D
configure:12436: $? = 0
configure:12449: result: no


It looks like -Wlogical-op is the culprit, not -O3.

This is the condition in configure:
---
if (exit $ac_status) && test -s "$ac_outfile"; then
  # The compiler can only warn and ignore the option if not recognized
  # So say no if there are warnings other than the usual output.
  $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_cv_prog_compiler_pic_works_D=yes
  fi
fi

[Bug d/88431] link errors on build

2018-12-11 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88431

--- Comment #1 from David Binderman  ---
This config line works fine:

../trunk/configure --prefix=/home/dcb/gcc/results.266950 \
--disable-multilib \
--disable-werror \
--enable-checking=df,extra,fold,rtl,yes \
--enable-languages=d

so it looks like using -O3 in the top level Makefile causes trouble.