diff mbox

[Ping] Port of VTV for Cygwin and MinGW

Message ID 54CA737A.5060102@ubuntu.com
State New
Headers show

Commit Message

Matthias Klose Jan. 29, 2015, 5:52 p.m. UTC
r220254 broke bootstrap on the trunk:

configure: error: conditional "VTV_CYGMIN" was never defined.
Usually this means the macro was only invoked conditionally.
Makefile:12932: recipe for target 'configure-stage1-target-libstdc++-v3' failed
make[4]: *** [configure-stage1-target-libstdc++-v3] Error 1

trying to build with the attached patch.

On 01/28/2015 11:58 PM, Caroline Tice wrote:
> Since all the pieces of this patch have been approved, I will commit
> it later today (since Patrick does not have commit privileges).
> 
> 
> -- Caroline Tice
> cmtice@google.com
> 
> 
> 
> On Wed, Jan 28, 2015 at 3:31 AM, Patrick Wollgast
> <patrick.wollgast@rub.de> wrote:
>> Ping.
>>
>> https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01270.html
>>
>> On 15.01.2015 22:50, Patrick Wollgast wrote:
>>> On 15.01.2015 17:01, Ian Lance Taylor wrote:
>>>> On Wed, Jan 14, 2015 at 11:54 PM, Patrick Wollgast
>>>> <patrick.wollgast@rub.de> wrote:
>>>>> Is there something I'm still supposed to do, since I don't have write
>>>>> access and this was the last part missing an "OK"?
>>>>
>>>> Somebody with write access will need to commit the patch for you.  You
>>>> should send a new clean patch including all the changes, along with
>>>> updated ChangeLog entries.
>>>>
>>>> Ian
>>>>
>>>
>>> For the clean patch I co'ed the latest version of the trunk again and
>>> applied my patch. It applies correctly, except for two changes:
>>>
>>> patching file libgcc/Makefile.in
>>> Hunk #1 succeeded at 995 with fuzz 2 (offset 9 lines).
>>> Hunk #2 succeeded at 1020 (offset 17 lines).
>>>
>>>> # This is a version of crtbegin for -static links.
>>>> crtbeginT$(objext): $(srcdir)/crtstuff.c
>>>>      $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN
>>>> -DCRTSTUFFT_O
>>>> endif
>>>>
>>>> ifeq ($(enable_vtable_verify),yes)
>>>> # These are used in vtable verification; see comments in source files
>>>> for
>>>> # more details.
>>>
>>> I had to move the endif down, since something was added before
>>> "ifeq ($(enable_vtable_verify),yes)" inside the if.
>>>
>>>> # This is a version of crtbegin for -static links.
>>>> crtbeginT$(objext): $(srcdir)/crtstuff.c
>>>>      $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN
>>>> -DCRTSTUFFT_O
>>>>
>>>> # crtoffloadbegin and crtoffloadend contain symbols, that mark the
>>>> begin and
>>>> # the end of tables with addresses, required for offloading.
>>>> crtoffloadbegin$(objext): $(srcdir)/offloadstuff.c
>>>>      $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN
>>>>
>>>> crtoffloadend$(objext): $(srcdir)/offloadstuff.c
>>>>      $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_END
>>>> endif
>>>>
>>>> ifeq ($(enable_vtable_verify),yes)
>>>> # These are used in vtable verification; see comments in source files
>>>> for
>>>> # more details.
>>>
>>>
>>> patching file libgcc/config.host
>>> Hunk #1 succeeded at 621 (offset 6 lines).
>>> Hunk #2 succeeded at 640 (offset 6 lines).
>>> Hunk #3 succeeded at 660 (offset 6 lines).
>>> Hunk #4 succeeded at 1198 with fuzz 2 (offset 495 lines).
>>>
>>>>      tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file}
>>> i386/t-slibgcc-cygming i386/t-mingw32 t-dfprules i386/t-crtfm i386/t-chkstk"
>>>>      extra_parts="$extra_parts crtfastmath.o"
>>>
>>> The last two lines were changed to the following two lines.
>>>
>>>>      tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file}
>>> i386/t-slibgcc-cygming i386/t-cygming i386/t-mingw32 t-dfprules
>>> i386/t-crtfm i386/t-chkstk"
>>>>      extra_parts="$extra_parts crtbegin.o crtend.o crtfastmath.o"
>>>
>>> And therefore Hunk #4, which follows these lines, wasn't applied correctly.
>>>
>>> These two parts were corrected in vtv_cygmin_clean.patch. For
>>> convenience I also added vtv_cygmin_unclean.patch, which is the patch
>>> from my last mail.
>>>
>>> Regards,
>>> Patrick
>>>

Comments

Matthias Klose Jan. 29, 2015, 6:05 p.m. UTC | #1
that fixes the build failure. ok to commit?

2015-01-29  Matthias Klose  <doko@ubuntu.com>

        * acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN
        unconditionally.
        * configure: Regenerate.

On 01/29/2015 06:52 PM, Matthias Klose wrote:
> r220254 broke bootstrap on the trunk:
> 
> configure: error: conditional "VTV_CYGMIN" was never defined.
> Usually this means the macro was only invoked conditionally.
> Makefile:12932: recipe for target 'configure-stage1-target-libstdc++-v3' failed
> make[4]: *** [configure-stage1-target-libstdc++-v3] Error 1
> 
> trying to build with the attached patch.
> 
> On 01/28/2015 11:58 PM, Caroline Tice wrote:
>> Since all the pieces of this patch have been approved, I will commit
>> it later today (since Patrick does not have commit privileges).
>>
>>
>> -- Caroline Tice
>> cmtice@google.com
>>
>>
>>
>> On Wed, Jan 28, 2015 at 3:31 AM, Patrick Wollgast
>> <patrick.wollgast@rub.de> wrote:
>>> Ping.
>>>
>>> https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01270.html
>>>
>>> On 15.01.2015 22:50, Patrick Wollgast wrote:
>>>> On 15.01.2015 17:01, Ian Lance Taylor wrote:
>>>>> On Wed, Jan 14, 2015 at 11:54 PM, Patrick Wollgast
>>>>> <patrick.wollgast@rub.de> wrote:
>>>>>> Is there something I'm still supposed to do, since I don't have write
>>>>>> access and this was the last part missing an "OK"?
>>>>>
>>>>> Somebody with write access will need to commit the patch for you.  You
>>>>> should send a new clean patch including all the changes, along with
>>>>> updated ChangeLog entries.
>>>>>
>>>>> Ian
>>>>>
>>>>
>>>> For the clean patch I co'ed the latest version of the trunk again and
>>>> applied my patch. It applies correctly, except for two changes:
>>>>
>>>> patching file libgcc/Makefile.in
>>>> Hunk #1 succeeded at 995 with fuzz 2 (offset 9 lines).
>>>> Hunk #2 succeeded at 1020 (offset 17 lines).
>>>>
>>>>> # This is a version of crtbegin for -static links.
>>>>> crtbeginT$(objext): $(srcdir)/crtstuff.c
>>>>>      $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN
>>>>> -DCRTSTUFFT_O
>>>>> endif
>>>>>
>>>>> ifeq ($(enable_vtable_verify),yes)
>>>>> # These are used in vtable verification; see comments in source files
>>>>> for
>>>>> # more details.
>>>>
>>>> I had to move the endif down, since something was added before
>>>> "ifeq ($(enable_vtable_verify),yes)" inside the if.
>>>>
>>>>> # This is a version of crtbegin for -static links.
>>>>> crtbeginT$(objext): $(srcdir)/crtstuff.c
>>>>>      $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN
>>>>> -DCRTSTUFFT_O
>>>>>
>>>>> # crtoffloadbegin and crtoffloadend contain symbols, that mark the
>>>>> begin and
>>>>> # the end of tables with addresses, required for offloading.
>>>>> crtoffloadbegin$(objext): $(srcdir)/offloadstuff.c
>>>>>      $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN
>>>>>
>>>>> crtoffloadend$(objext): $(srcdir)/offloadstuff.c
>>>>>      $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_END
>>>>> endif
>>>>>
>>>>> ifeq ($(enable_vtable_verify),yes)
>>>>> # These are used in vtable verification; see comments in source files
>>>>> for
>>>>> # more details.
>>>>
>>>>
>>>> patching file libgcc/config.host
>>>> Hunk #1 succeeded at 621 (offset 6 lines).
>>>> Hunk #2 succeeded at 640 (offset 6 lines).
>>>> Hunk #3 succeeded at 660 (offset 6 lines).
>>>> Hunk #4 succeeded at 1198 with fuzz 2 (offset 495 lines).
>>>>
>>>>>      tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file}
>>>> i386/t-slibgcc-cygming i386/t-mingw32 t-dfprules i386/t-crtfm i386/t-chkstk"
>>>>>      extra_parts="$extra_parts crtfastmath.o"
>>>>
>>>> The last two lines were changed to the following two lines.
>>>>
>>>>>      tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file}
>>>> i386/t-slibgcc-cygming i386/t-cygming i386/t-mingw32 t-dfprules
>>>> i386/t-crtfm i386/t-chkstk"
>>>>>      extra_parts="$extra_parts crtbegin.o crtend.o crtfastmath.o"
>>>>
>>>> And therefore Hunk #4, which follows these lines, wasn't applied correctly.
>>>>
>>>> These two parts were corrected in vtv_cygmin_clean.patch. For
>>>> convenience I also added vtv_cygmin_unclean.patch, which is the patch
>>>> from my last mail.
>>>>
>>>> Regards,
>>>> Patrick
>>>>
>
Jonathan Wakely Jan. 29, 2015, 6:11 p.m. UTC | #2
On 29/01/15 19:05 +0100, Matthias Klose wrote:
>that fixes the build failure. ok to commit?
>
>2015-01-29  Matthias Klose  <doko@ubuntu.com>
>
>        * acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN
>        unconditionally.
>        * configure: Regenerate.

OK, thanks.
H.J. Lu Jan. 29, 2015, 6:12 p.m. UTC | #3
On Thu, Jan 29, 2015 at 10:05 AM, Matthias Klose <doko@ubuntu.com> wrote:
> that fixes the build failure. ok to commit?
>
> 2015-01-29  Matthias Klose  <doko@ubuntu.com>
>
>         * acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN
>         unconditionally.
>         * configure: Regenerate.
>

 This is wrong.  You are checking vtv_cygmin before it is defined.
H.J. Lu Jan. 29, 2015, 6:13 p.m. UTC | #4
On Thu, Jan 29, 2015 at 10:11 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 29/01/15 19:05 +0100, Matthias Klose wrote:
>>
>> that fixes the build failure. ok to commit?
>>
>> 2015-01-29  Matthias Klose  <doko@ubuntu.com>
>>
>>        * acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN
>>        unconditionally.
>>        * configure: Regenerate.
>
>
> OK, thanks.
>

It is NOT OK.
diff mbox

Patch

--- a/src/libstdc++-v3/acinclude.m4
+++ b/src/libstdc++-v3/acinclude.m4
@@ -2320,6 +2320,8 @@ 
   AC_MSG_CHECKING([for vtable verify support])
   AC_MSG_RESULT([$enable_vtable_verify])
 
+  AM_CONDITIONAL(VTV_CYGMIN, test $vtv_cygmin = yes)
+
   if test $enable_vtable_verify = yes; then
     case ${target_os} in
       cygwin*|mingw32*)
@@ -2331,7 +2333,6 @@ 
         vtv_cygmin="no"
         ;;
     esac
-    AM_CONDITIONAL(VTV_CYGMIN, test $vtv_cygmin = yes)
     VTV_PCH_CXXFLAGS="-fvtable-verify=std"
     VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,--rpath -Wl,${toplevel_builddir}/libvtv/.libs"		
   else