clang6: FIX for games/ja2-stracciatella

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

clang6: FIX for games/ja2-stracciatella

Brian Callahan-3
Hi ports --

Minimal clang6 fix for games/ja2-stracciatella. De-hardcode a c++ while
here.
OK?

~Brian


ja2-stracciatella-clang6.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: clang6: FIX for games/ja2-stracciatella

Klemens Nanni-2
On Sun, Apr 15, 2018 at 02:56:41PM -0400, Brian Callahan wrote:

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/ja2-stracciatella/Makefile,v
> retrieving revision 1.3
> diff -u -p -r1.3 Makefile
> --- Makefile 26 Jul 2017 22:45:21 -0000 1.3
> +++ Makefile 15 Apr 2018 18:50:40 -0000
> @@ -27,7 +27,7 @@ RUN_DEPENDS = x11/gtk+3,-guic \
>  
>  USE_GMAKE = Yes
>  MAKE_FLAGS = Q= WITH_UNITTESTS=0 WITH_DEBUGINFO=1 \
> - CXX=c++
> + CXX="${CXX}"
>  
>  NO_TEST = Yes
>  
> Index: patches/patch-Makefile
> ===================================================================
> RCS file: /cvs/ports/games/ja2-stracciatella/patches/patch-Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-Makefile
> --- patches/patch-Makefile 13 Jun 2017 09:24:23 -0000 1.1.1.1
> +++ patches/patch-Makefile 15 Apr 2018 18:50:40 -0000
> @@ -1,6 +1,7 @@
>  $OpenBSD: patch-Makefile,v 1.1.1.1 2017/06/13 09:24:23 kirby Exp $
> ---- Makefile.orig Sun Sep 11 12:13:27 2016
> -+++ Makefile Wed Sep 21 14:30:42 2016
> +Index: Makefile
> +--- Makefile.orig
> ++++ Makefile
>  @@ -3,15 +3,11 @@
>   # Please update COMPILATION.txt if necessary after changing this file.
>   #
> @@ -38,6 +39,15 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2017/
>   CFLAGS += -I _build/lib-rapidjson
>   CFLAGS += -I _build/lib-slog
>   CFLAGS += -I _build/lib-smacker/libsmacker
> +@@ -155,7 +151,7 @@ CCFLAGS += -Werror-implicit-function-declaration
> + CCFLAGS += -Wimplicit-int
> + CCFLAGS += -Wmissing-prototypes
> +
> +-CXXFLAGS += $(CFLAGS)
> ++CXXFLAGS += $(CFLAGS) -std=gnu++98
Why not passing it through CFLAGS in MAKE_FLAGS as done with CXX?

Reply | Threaded
Open this post in threaded view
|

Re: clang6: FIX for games/ja2-stracciatella

Brian Callahan-3

On 04/15/18 15:37, Klemens Nanni wrote:

> On Sun, Apr 15, 2018 at 02:56:41PM -0400, Brian Callahan wrote:
>> Index: Makefile
>> ===================================================================
>> RCS file: /cvs/ports/games/ja2-stracciatella/Makefile,v
>> retrieving revision 1.3
>> diff -u -p -r1.3 Makefile
>> --- Makefile 26 Jul 2017 22:45:21 -0000 1.3
>> +++ Makefile 15 Apr 2018 18:50:40 -0000
>> @@ -27,7 +27,7 @@ RUN_DEPENDS = x11/gtk+3,-guic \
>>  
>>   USE_GMAKE = Yes
>>   MAKE_FLAGS = Q= WITH_UNITTESTS=0 WITH_DEBUGINFO=1 \
>> - CXX=c++
>> + CXX="${CXX}"
>>  
>>   NO_TEST = Yes
>>  
>> Index: patches/patch-Makefile
>> ===================================================================
>> RCS file: /cvs/ports/games/ja2-stracciatella/patches/patch-Makefile,v
>> retrieving revision 1.1.1.1
>> diff -u -p -r1.1.1.1 patch-Makefile
>> --- patches/patch-Makefile 13 Jun 2017 09:24:23 -0000 1.1.1.1
>> +++ patches/patch-Makefile 15 Apr 2018 18:50:40 -0000
>> @@ -1,6 +1,7 @@
>>   $OpenBSD: patch-Makefile,v 1.1.1.1 2017/06/13 09:24:23 kirby Exp $
>> ---- Makefile.orig Sun Sep 11 12:13:27 2016
>> -+++ Makefile Wed Sep 21 14:30:42 2016
>> +Index: Makefile
>> +--- Makefile.orig
>> ++++ Makefile
>>   @@ -3,15 +3,11 @@
>>    # Please update COMPILATION.txt if necessary after changing this file.
>>    #
>> @@ -38,6 +39,15 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2017/
>>    CFLAGS += -I _build/lib-rapidjson
>>    CFLAGS += -I _build/lib-slog
>>    CFLAGS += -I _build/lib-smacker/libsmacker
>> +@@ -155,7 +151,7 @@ CCFLAGS += -Werror-implicit-function-declaration
>> + CCFLAGS += -Wimplicit-int
>> + CCFLAGS += -Wmissing-prototypes
>> +
>> +-CXXFLAGS += $(CFLAGS)
>> ++CXXFLAGS += $(CFLAGS) -std=gnu++98
> Why not passing it through CFLAGS in MAKE_FLAGS as done with CXX?

Because it ends up obliterating all the other CXXFLAGS, and compilation
fails immediately.

Reply | Threaded
Open this post in threaded view
|

Re: clang6: FIX for games/ja2-stracciatella

Anthony J. Bentley-4
Brian Callahan writes:

>
> On 04/15/18 15:37, Klemens Nanni wrote:
> > On Sun, Apr 15, 2018 at 02:56:41PM -0400, Brian Callahan wrote:
> >> Index: Makefile
> >> ===================================================================
> >> RCS file: /cvs/ports/games/ja2-stracciatella/Makefile,v
> >> retrieving revision 1.3
> >> diff -u -p -r1.3 Makefile
> >> --- Makefile 26 Jul 2017 22:45:21 -0000 1.3
> >> +++ Makefile 15 Apr 2018 18:50:40 -0000
> >> @@ -27,7 +27,7 @@ RUN_DEPENDS = x11/gtk+3,-guic \
> >>  
> >>   USE_GMAKE = Yes
> >>   MAKE_FLAGS = Q= WITH_UNITTESTS=0 WITH_DEBUGINFO=1 \
> >> - CXX=c++
> >> + CXX="${CXX}"
> >>  
> >>   NO_TEST = Yes
> >>  
> >> Index: patches/patch-Makefile
> >> ===================================================================
> >> RCS file: /cvs/ports/games/ja2-stracciatella/patches/patch-Makefile,v
> >> retrieving revision 1.1.1.1
> >> diff -u -p -r1.1.1.1 patch-Makefile
> >> --- patches/patch-Makefile 13 Jun 2017 09:24:23 -0000 1.1.1.1
> >> +++ patches/patch-Makefile 15 Apr 2018 18:50:40 -0000
> >> @@ -1,6 +1,7 @@
> >>   $OpenBSD: patch-Makefile,v 1.1.1.1 2017/06/13 09:24:23 kirby Exp $
> >> ---- Makefile.orig Sun Sep 11 12:13:27 2016
> >> -+++ Makefile Wed Sep 21 14:30:42 2016
> >> +Index: Makefile
> >> +--- Makefile.orig
> >> ++++ Makefile
> >>   @@ -3,15 +3,11 @@
> >>    # Please update COMPILATION.txt if necessary after changing this file.
> >>    #
> >> @@ -38,6 +39,15 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2017/
> >>    CFLAGS += -I _build/lib-rapidjson
> >>    CFLAGS += -I _build/lib-slog
> >>    CFLAGS += -I _build/lib-smacker/libsmacker
> >> +@@ -155,7 +151,7 @@ CCFLAGS += -Werror-implicit-function-declaration
> >> + CCFLAGS += -Wimplicit-int
> >> + CCFLAGS += -Wmissing-prototypes
> >> +
> >> +-CXXFLAGS += $(CFLAGS)
> >> ++CXXFLAGS += $(CFLAGS) -std=gnu++98
> > Why not passing it through CFLAGS in MAKE_FLAGS as done with CXX?
>
> Because it ends up obliterating all the other CXXFLAGS, and compilation
> fails immediately.

I agree with the CXX fix. David Carlier already sent a diff that uses
MAKE_ENV to fix clang6. I would prefer that to setting CXXFLAGS, except
with -Wno-narrowing instead of -std.

MAKE_ENV =  CXXFLAGS="${CXXFLAGS} -Wno-narrowing"