enable build of graphics/libraw on gcc4 arches

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

enable build of graphics/libraw on gcc4 arches

Kirill Bychkov
Hi!
This patch enables build of libraw on other gcc4 arches, not only arm.
Tested on macppc.
OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/libraw/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- Makefile    16 Nov 2017 23:20:39 -0000      1.29
+++ Makefile    3 Dec 2017 07:51:00 -0000
@@ -23,8 +23,6 @@
 MASTER_SITES =         https://www.libraw.org/data/

 COMPILER =             base-clang ports-gcc
-# for atomic builtins (__sync_fetch_and_add_4)
-MODGCC4_ARCHS =                arm

 LIB_DEPENDS =          graphics/jasper \
                        graphics/lcms2


Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Jeremie Courreges-Anglas-2
On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
> Hi!
> This patch enables build of libraw on other gcc4 arches, not only arm.
> Tested on macppc.
> OK?

This looks heavy-handed to me, why extend this to all non-clang archs,
afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
build fail exactly?

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/libraw/Makefile,v
> retrieving revision 1.29
> diff -u -r1.29 Makefile
> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
> +++ Makefile    3 Dec 2017 07:51:00 -0000
> @@ -23,8 +23,6 @@
>  MASTER_SITES =         https://www.libraw.org/data/
>
>  COMPILER =             base-clang ports-gcc
> -# for atomic builtins (__sync_fetch_and_add_4)
> -MODGCC4_ARCHS =                arm
>
>  LIB_DEPENDS =          graphics/jasper \
>                         graphics/lcms2
>
>

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Kirill Bychkov
On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> Hi!
>> This patch enables build of libraw on other gcc4 arches, not only arm.
>> Tested on macppc.
>> OK?
>
> This looks heavy-handed to me, why extend this to all non-clang archs,
> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
> build fail exactly?

Without patch I see
===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc (macppc) .
MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:

make show=ONLY_FOR_ARCHS
aarch64 amd64 i386 arm

With patch:
make show=ONLY_FOR_ARCHS
aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64

Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most arches.
See
http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25

Better patch:

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/libraw/Makefile,v
retrieving revision 1.29
diff -u -p -u -r1.29 Makefile
--- Makefile    16 Nov 2017 23:20:39 -0000      1.29
+++ Makefile    6 Dec 2017 08:13:27 -0000
@@ -22,9 +22,10 @@ WANTLIB += c jasper jpeg lcms2 m pthread

 MASTER_SITES =         https://www.libraw.org/data/

-COMPILER =             base-clang ports-gcc
 # for atomic builtins (__sync_fetch_and_add_4)
-MODGCC4_ARCHS =                arm
+.if ${MACHINE_ARCH} == "arm"
+COMPILER = base-clang ports-gcc
+.endif

 LIB_DEPENDS =          graphics/jasper \
                        graphics/lcms2


>
>> Index: Makefile
>> ===================================================================
>> RCS file: /cvs/ports/graphics/libraw/Makefile,v
>> retrieving revision 1.29
>> diff -u -r1.29 Makefile
>> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
>> +++ Makefile    3 Dec 2017 07:51:00 -0000
>> @@ -23,8 +23,6 @@
>>  MASTER_SITES =         https://www.libraw.org/data/
>>
>>  COMPILER =             base-clang ports-gcc
>> -# for atomic builtins (__sync_fetch_and_add_4)
>> -MODGCC4_ARCHS =                arm
>>
>>  LIB_DEPENDS =          graphics/jasper \
>>                         graphics/lcms2
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Jeremie Courreges-Anglas-2
On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:

> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>>> Hi!
>>> This patch enables build of libraw on other gcc4 arches, not only arm.
>>> Tested on macppc.
>>> OK?
>>
>> This looks heavy-handed to me, why extend this to all non-clang archs,
>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
>> build fail exactly?
>
> Without patch I see
> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc (macppc) .
> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>
> make show=ONLY_FOR_ARCHS
> aarch64 amd64 i386 arm
>
> With patch:
> make show=ONLY_FOR_ARCHS
> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>
> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most arches.
> See
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25

ok, thanks for confirming.

> Better patch:
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/libraw/Makefile,v
> retrieving revision 1.29
> diff -u -p -u -r1.29 Makefile
> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
> +++ Makefile    6 Dec 2017 08:13:27 -0000
> @@ -22,9 +22,10 @@ WANTLIB += c jasper jpeg lcms2 m pthread
>
>  MASTER_SITES =         https://www.libraw.org/data/
>
> -COMPILER =             base-clang ports-gcc
>  # for atomic builtins (__sync_fetch_and_add_4)
> -MODGCC4_ARCHS =                arm
> +.if ${MACHINE_ARCH} == "arm"
> +COMPILER = base-clang ports-gcc
> +.endif

I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
end of COMPILER?

>  LIB_DEPENDS =          graphics/jasper \
>                         graphics/lcms2
>
>
>>
>>> Index: Makefile
>>> ===================================================================
>>> RCS file: /cvs/ports/graphics/libraw/Makefile,v
>>> retrieving revision 1.29
>>> diff -u -r1.29 Makefile
>>> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
>>> +++ Makefile    3 Dec 2017 07:51:00 -0000
>>> @@ -23,8 +23,6 @@
>>>  MASTER_SITES =         https://www.libraw.org/data/
>>>
>>>  COMPILER =             base-clang ports-gcc
>>> -# for atomic builtins (__sync_fetch_and_add_4)
>>> -MODGCC4_ARCHS =                arm
>>>
>>>  LIB_DEPENDS =          graphics/jasper \
>>>                         graphics/lcms2
>>>
>>>
>>
>
>


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Kirill Bychkov
On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:

> On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>>>> Hi!
>>>> This patch enables build of libraw on other gcc4 arches, not only arm.
>>>> Tested on macppc.
>>>> OK?
>>>
>>> This looks heavy-handed to me, why extend this to all non-clang archs,
>>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
>>> build fail exactly?
>>
>> Without patch I see
>> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>> (macppc) .
>> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>>
>> make show=ONLY_FOR_ARCHS
>> aarch64 amd64 i386 arm
>>
>> With patch:
>> make show=ONLY_FOR_ARCHS
>> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>>
>> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
>> arches.
>> See
>> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>
> ok, thanks for confirming.
>
>> Better patch:
>>
>> Index: Makefile
>> ===================================================================
>> RCS file: /cvs/ports/graphics/libraw/Makefile,v
>> retrieving revision 1.29
>> diff -u -p -u -r1.29 Makefile
>> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
>> +++ Makefile    6 Dec 2017 08:13:27 -0000
>> @@ -22,9 +22,10 @@ WANTLIB += c jasper jpeg lcms2 m pthread
>>
>>  MASTER_SITES =         https://www.libraw.org/data/
>>
>> -COMPILER =             base-clang ports-gcc
>>  # for atomic builtins (__sync_fetch_and_add_4)
>> -MODGCC4_ARCHS =                arm
>> +.if ${MACHINE_ARCH} == "arm"
>> +COMPILER = base-clang ports-gcc
>> +.endif
>
> I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
> end of COMPILER?

macppc is quite happy with base-gcc, so it should be before ports-gcc. And
for arm ports-gcc is the only solution I suppose (have no hw to test).
So I see no other way to deal with arm other than this.



Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Stuart Henderson
On 2017/12/06 11:49, Kirill Bychkov wrote:

> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
> >>>> Hi!
> >>>> This patch enables build of libraw on other gcc4 arches, not only arm.
> >>>> Tested on macppc.
> >>>> OK?
> >>>
> >>> This looks heavy-handed to me, why extend this to all non-clang archs,
> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
> >>> build fail exactly?
> >>
> >> Without patch I see
> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
> >> (macppc) .
> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
> >>
> >> make show=ONLY_FOR_ARCHS
> >> aarch64 amd64 i386 arm
> >>
> >> With patch:
> >> make show=ONLY_FOR_ARCHS
> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
> >>
> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
> >> arches.
> >> See
> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
> >
> > ok, thanks for confirming.
> >
> >> Better patch:
> >>
> >> Index: Makefile
> >> ===================================================================
> >> RCS file: /cvs/ports/graphics/libraw/Makefile,v
> >> retrieving revision 1.29
> >> diff -u -p -u -r1.29 Makefile
> >> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
> >> +++ Makefile    6 Dec 2017 08:13:27 -0000
> >> @@ -22,9 +22,10 @@ WANTLIB += c jasper jpeg lcms2 m pthread
> >>
> >>  MASTER_SITES =         https://www.libraw.org/data/
> >>
> >> -COMPILER =             base-clang ports-gcc
> >>  # for atomic builtins (__sync_fetch_and_add_4)
> >> -MODGCC4_ARCHS =                arm
> >> +.if ${MACHINE_ARCH} == "arm"
> >> +COMPILER = base-clang ports-gcc
> >> +.endif
> >
> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
> > end of COMPILER?
>
> macppc is quite happy with base-gcc, so it should be before ports-gcc. And
> for arm ports-gcc is the only solution I suppose (have no hw to test).
> So I see no other way to deal with arm other than this.
>
>
>

I think COMPILER should be removed here, seems it should probably
use this instead (untested):

# XXX remove when armv7 switches to clang in base?
MODULES= gcc4
MODGCC4_ARCHS= arm
MODGCC4_LANGS= c++

Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Kirill Bychkov
On Wed, December 6, 2017 14:37, Stuart Henderson wrote:

> On 2017/12/06 11:49, Kirill Bychkov wrote:
>> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
>> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >>>> Hi!
>> >>>> This patch enables build of libraw on other gcc4 arches, not only arm.
>> >>>> Tested on macppc.
>> >>>> OK?
>> >>>
>> >>> This looks heavy-handed to me, why extend this to all non-clang archs,
>> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
>> >>> build fail exactly?
>> >>
>> >> Without patch I see
>> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>> >> (macppc) .
>> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>> >>
>> >> make show=ONLY_FOR_ARCHS
>> >> aarch64 amd64 i386 arm
>> >>
>> >> With patch:
>> >> make show=ONLY_FOR_ARCHS
>> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>> >>
>> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
>> >> arches.
>> >> See
>> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>> >
>> > ok, thanks for confirming.
>> >
>> >> Better patch:
>> >>
>> >> Index: Makefile
>> >> ===================================================================
>> >> RCS file: /cvs/ports/graphics/libraw/Makefile,v
>> >> retrieving revision 1.29
>> >> diff -u -p -u -r1.29 Makefile
>> >> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
>> >> +++ Makefile    6 Dec 2017 08:13:27 -0000
>> >> @@ -22,9 +22,10 @@ WANTLIB += c jasper jpeg lcms2 m pthread
>> >>
>> >>  MASTER_SITES =         https://www.libraw.org/data/
>> >>
>> >> -COMPILER =             base-clang ports-gcc
>> >>  # for atomic builtins (__sync_fetch_and_add_4)
>> >> -MODGCC4_ARCHS =                arm
>> >> +.if ${MACHINE_ARCH} == "arm"
>> >> +COMPILER = base-clang ports-gcc
>> >> +.endif
>> >
>> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
>> > end of COMPILER?
>>
>> macppc is quite happy with base-gcc, so it should be before ports-gcc. And
>> for arm ports-gcc is the only solution I suppose (have no hw to test).
>> So I see no other way to deal with arm other than this.
>>
>>
>>
>
> I think COMPILER should be removed here, seems it should probably
> use this instead (untested):
>
> # XXX remove when armv7 switches to clang in base?
> MODULES= gcc4
> MODGCC4_ARCHS= arm
> MODGCC4_LANGS= c++
>
>
Missed that point that we could simply return back to MODULES=gcc instead
of COMPILER. Works for me on macppc and amd64.

Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Stuart Henderson
On 2017/12/06 15:32, Kirill Bychkov wrote:

> On Wed, December 6, 2017 14:37, Stuart Henderson wrote:
> > On 2017/12/06 11:49, Kirill Bychkov wrote:
> >> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
> >> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
> >> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
> >> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
> >> >>>> Hi!
> >> >>>> This patch enables build of libraw on other gcc4 arches, not only arm.
> >> >>>> Tested on macppc.
> >> >>>> OK?
> >> >>>
> >> >>> This looks heavy-handed to me, why extend this to all non-clang archs,
> >> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
> >> >>> build fail exactly?
> >> >>
> >> >> Without patch I see
> >> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
> >> >> (macppc) .
> >> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
> >> >>
> >> >> make show=ONLY_FOR_ARCHS
> >> >> aarch64 amd64 i386 arm
> >> >>
> >> >> With patch:
> >> >> make show=ONLY_FOR_ARCHS
> >> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
> >> >>
> >> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
> >> >> arches.
> >> >> See
> >> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
> >> >
> >> > ok, thanks for confirming.
> >> >
> >> >> Better patch:
> >> >>
> >> >> Index: Makefile
> >> >> ===================================================================
> >> >> RCS file: /cvs/ports/graphics/libraw/Makefile,v
> >> >> retrieving revision 1.29
> >> >> diff -u -p -u -r1.29 Makefile
> >> >> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
> >> >> +++ Makefile    6 Dec 2017 08:13:27 -0000
> >> >> @@ -22,9 +22,10 @@ WANTLIB += c jasper jpeg lcms2 m pthread
> >> >>
> >> >>  MASTER_SITES =         https://www.libraw.org/data/
> >> >>
> >> >> -COMPILER =             base-clang ports-gcc
> >> >>  # for atomic builtins (__sync_fetch_and_add_4)
> >> >> -MODGCC4_ARCHS =                arm
> >> >> +.if ${MACHINE_ARCH} == "arm"
> >> >> +COMPILER = base-clang ports-gcc
> >> >> +.endif
> >> >
> >> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
> >> > end of COMPILER?
> >>
> >> macppc is quite happy with base-gcc, so it should be before ports-gcc. And
> >> for arm ports-gcc is the only solution I suppose (have no hw to test).
> >> So I see no other way to deal with arm other than this.
> >>
> >>
> >>
> >
> > I think COMPILER should be removed here, seems it should probably
> > use this instead (untested):
> >
> > # XXX remove when armv7 switches to clang in base?
> > MODULES= gcc4
> > MODGCC4_ARCHS= arm
> > MODGCC4_LANGS= c++
> >
> >
> Missed that point that we could simply return back to MODULES=gcc instead
> of COMPILER. Works for me on macppc and amd64.
>

Is it worth trying that on hppa as well?

OK?


Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/libraw/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- Makefile 16 Nov 2017 23:20:39 -0000 1.29
+++ Makefile 6 Dec 2017 13:15:56 -0000
@@ -1,7 +1,5 @@
 # $OpenBSD: Makefile,v 1.29 2017/11/16 23:20:39 naddy Exp $
 
-BROKEN-hppa = undefined reference to __sync_fetch_and_add_4
-
 COMMENT = library for reading RAW files
 
 DISTNAME = LibRaw-0.18.5
@@ -22,9 +20,11 @@ WANTLIB += c jasper jpeg lcms2 m pthread
 
 MASTER_SITES = https://www.libraw.org/data/
 
-COMPILER = base-clang ports-gcc
+MODULES = gcc4
 # for atomic builtins (__sync_fetch_and_add_4)
-MODGCC4_ARCHS = arm
+# XXX remove when armv7 switches to clang in base?
+MODGCC4_ARCHS = arm hppa
+MODGCC4_LANGS = c++
 
 LIB_DEPENDS = graphics/jasper \
  graphics/lcms2

Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Kirill Bychkov
On Wed, December 6, 2017 16:16, Stuart Henderson wrote:

> On 2017/12/06 15:32, Kirill Bychkov wrote:
>> On Wed, December 6, 2017 14:37, Stuart Henderson wrote:
>> > On 2017/12/06 11:49, Kirill Bychkov wrote:
>> >> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
>> >> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>> >> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >> >>>> Hi!
>> >> >>>> This patch enables build of libraw on other gcc4 arches, not only
>> arm.
>> >> >>>> Tested on macppc.
>> >> >>>> OK?
>> >> >>>
>> >> >>> This looks heavy-handed to me, why extend this to all non-clang
>> archs,
>> >> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does
>> the
>> >> >>> build fail exactly?
>> >> >>
>> >> >> Without patch I see
>> >> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>> >> >> (macppc) .
>> >> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>> >> >>
>> >> >> make show=ONLY_FOR_ARCHS
>> >> >> aarch64 amd64 i386 arm
>> >> >>
>> >> >> With patch:
>> >> >> make show=ONLY_FOR_ARCHS
>> >> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>> >> >>
>> >> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
>> >> >> arches.
>> >> >> See
>> >> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>> >> >
>> >> > ok, thanks for confirming.
>> >> >
>> >> >> Better patch:
>> >> >>
>> >> >> Index: Makefile
>> >> >> ===================================================================
>> >> >> RCS file: /cvs/ports/graphics/libraw/Makefile,v
>> >> >> retrieving revision 1.29
>> >> >> diff -u -p -u -r1.29 Makefile
>> >> >> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
>> >> >> +++ Makefile    6 Dec 2017 08:13:27 -0000
>> >> >> @@ -22,9 +22,10 @@ WANTLIB += c jasper jpeg lcms2 m pthread
>> >> >>
>> >> >>  MASTER_SITES =         https://www.libraw.org/data/
>> >> >>
>> >> >> -COMPILER =             base-clang ports-gcc
>> >> >>  # for atomic builtins (__sync_fetch_and_add_4)
>> >> >> -MODGCC4_ARCHS =                arm
>> >> >> +.if ${MACHINE_ARCH} == "arm"
>> >> >> +COMPILER = base-clang ports-gcc
>> >> >> +.endif
>> >> >
>> >> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
>> >> > end of COMPILER?
>> >>
>> >> macppc is quite happy with base-gcc, so it should be before ports-gcc.
>> And
>> >> for arm ports-gcc is the only solution I suppose (have no hw to test).
>> >> So I see no other way to deal with arm other than this.
>> >>
>> >>
>> >>
>> >
>> > I think COMPILER should be removed here, seems it should probably
>> > use this instead (untested):
>> >
>> > # XXX remove when armv7 switches to clang in base?
>> > MODULES= gcc4
>> > MODGCC4_ARCHS= arm
>> > MODGCC4_LANGS= c++
>> >
>> >
>> Missed that point that we could simply return back to MODULES=gcc instead
>> of COMPILER. Works for me on macppc and amd64.
>>
>
> Is it worth trying that on hppa as well?
>
> OK?

OK.



Reply | Threaded
Open this post in threaded view
|

Re: enable build of graphics/libraw on gcc4 arches

Jeremie Courreges-Anglas-2
On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:

> On Wed, December 6, 2017 16:16, Stuart Henderson wrote:
>> On 2017/12/06 15:32, Kirill Bychkov wrote:
>>> On Wed, December 6, 2017 14:37, Stuart Henderson wrote:
>>> > On 2017/12/06 11:49, Kirill Bychkov wrote:
>>> >> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
>>> >> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>>> >> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>>> >> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>>> >> >>>> Hi!
>>> >> >>>> This patch enables build of libraw on other gcc4 arches, not only
>>> arm.
>>> >> >>>> Tested on macppc.
>>> >> >>>> OK?
>>> >> >>>
>>> >> >>> This looks heavy-handed to me, why extend this to all non-clang
>>> archs,
>>> >> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does
>>> the
>>> >> >>> build fail exactly?
>>> >> >>
>>> >> >> Without patch I see
>>> >> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>>> >> >> (macppc) .
>>> >> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>>> >> >>
>>> >> >> make show=ONLY_FOR_ARCHS
>>> >> >> aarch64 amd64 i386 arm
>>> >> >>
>>> >> >> With patch:
>>> >> >> make show=ONLY_FOR_ARCHS
>>> >> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>>> >> >>
>>> >> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
>>> >> >> arches.
>>> >> >> See
>>> >> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>>> >> >
>>> >> > ok, thanks for confirming.
>>> >> >
>>> >> >> Better patch:
>>> >> >>
>>> >> >> Index: Makefile
>>> >> >> ===================================================================
>>> >> >> RCS file: /cvs/ports/graphics/libraw/Makefile,v
>>> >> >> retrieving revision 1.29
>>> >> >> diff -u -p -u -r1.29 Makefile
>>> >> >> --- Makefile    16 Nov 2017 23:20:39 -0000      1.29
>>> >> >> +++ Makefile    6 Dec 2017 08:13:27 -0000
>>> >> >> @@ -22,9 +22,10 @@ WANTLIB += c jasper jpeg lcms2 m pthread
>>> >> >>
>>> >> >>  MASTER_SITES =         https://www.libraw.org/data/
>>> >> >>
>>> >> >> -COMPILER =             base-clang ports-gcc
>>> >> >>  # for atomic builtins (__sync_fetch_and_add_4)
>>> >> >> -MODGCC4_ARCHS =                arm
>>> >> >> +.if ${MACHINE_ARCH} == "arm"
>>> >> >> +COMPILER = base-clang ports-gcc
>>> >> >> +.endif
>>> >> >
>>> >> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
>>> >> > end of COMPILER?
>>> >>
>>> >> macppc is quite happy with base-gcc, so it should be before ports-gcc.
>>> And
>>> >> for arm ports-gcc is the only solution I suppose (have no hw to test).
>>> >> So I see no other way to deal with arm other than this.
>>> >>
>>> >>
>>> >>
>>> >
>>> > I think COMPILER should be removed here, seems it should probably
>>> > use this instead (untested):
>>> >
>>> > # XXX remove when armv7 switches to clang in base?
>>> > MODULES= gcc4
>>> > MODGCC4_ARCHS= arm
>>> > MODGCC4_LANGS= c++
>>> >
>>> >
>>> Missed that point that we could simply return back to MODULES=gcc instead
>>> of COMPILER. Works for me on macppc and amd64.
>>>
>>
>> Is it worth trying that on hppa as well?
>>
>> OK?
>
> OK.

ok here too, thanks for taking care of this.

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

COMPILER -> MODULES (Was: Re: enable build of graphics/libraw on gcc4 arches)

Kirill Bychkov
In reply to this post by Stuart Henderson
On Wed, December 6, 2017 14:37, Stuart Henderson wrote:

> On 2017/12/06 11:49, Kirill Bychkov wrote:
>> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
>> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >>>> Hi!
>> >>>> This patch enables build of libraw on other gcc4 arches, not only arm.
>> >>>> Tested on macppc.
>> >>>> OK?
>> >>>
>> >>> This looks heavy-handed to me, why extend this to all non-clang archs,
>> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
>> >>> build fail exactly?
>> >>
>> >> Without patch I see
>> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>> >> (macppc) .
>> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>> >>
>> >> make show=ONLY_FOR_ARCHS
>> >> aarch64 amd64 i386 arm
>> >>
>> >> With patch:
>> >> make show=ONLY_FOR_ARCHS
>> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>> >>
>> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
>> >> arches.
>> >> See
>> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>> >
>> > ok, thanks for confirming.
>> >
>> >[...]
>> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
>> > end of COMPILER?
>>
>> macppc is quite happy with base-gcc, so it should be before ports-gcc. And
>> for arm ports-gcc is the only solution I suppose (have no hw to test).
>> So I see no other way to deal with arm other than this.
>>
> I think COMPILER should be removed here, seems it should probably
> use this instead (untested):
>
> # XXX remove when armv7 switches to clang in base?
> MODULES= gcc4
> MODGCC4_ARCHS= arm
> MODGCC4_LANGS= c++
>

Hello,
Another look at the tree showed more incorrect removals of MODULES=gcc:
in devel/libgit2/libgit2 [1] and devel/libmtp [2].
So I propose to switch back to MODULES=gcc4 instead of COMPILEr and unlock
building of this ports on most !clang archs.
Builds fine on macppc (base-gcc) and amd64 (base-clang).
OK? Comments?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libmtp/Makefile,v
retrieving revision 1.39
diff -u -p -u -r1.39 Makefile
--- Makefile    16 Nov 2017 23:20:38 -0000      1.39
+++ Makefile    7 Dec 2017 14:31:27 -0000
@@ -17,8 +17,7 @@ WANTLIB += c gcrypt gpg-error iconv intl
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=libmtp/}

 # avoid "libmtp.so.7.0: undefined reference to `.L2085'"
-COMPILER=              base-clang ports-gcc
-COMPILER_LANGS=                c
+MODULES=               gcc4
 MODGCC4_ARCHS=         mips64 mips64el

 LIB_DEPENDS=           devel/libusb1 \

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libgit2/libgit2/Makefile,v
retrieving revision 1.31
diff -u -r1.31 Makefile
--- Makefile    16 Nov 2017 23:20:38 -0000      1.31
+++ Makefile    7 Dec 2017 14:38:15 -0000
@@ -10,13 +10,12 @@
 SHARED_LIBS +=  git2                      10.0 # 0.25

 MODULES=               devel/cmake \
-                       lang/python
+                       lang/python \
+                       gcc4

 MODPY_RUNDEP=          No

 # for atomic builtins
-COMPILER=              base-clang ports-gcc
-COMPILER_LANGS=                c
 MODGCC4_ARCHS=         arm

 # bundles https://github.com/nodejs/http-parser


[1]
http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/devel/libgit2/libgit2/Makefile.diff?r1=1.29&r2=1.30
[2]
http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/devel/libmtp/Makefile.diff?r1=1.35&r2=1.36&f=h&f=u

Reply | Threaded
Open this post in threaded view
|

Re: COMPILER -> MODULES (Was: Re: enable build of graphics/libraw on gcc4 arches)

Marc Espie-2
On Thu, Dec 07, 2017 at 05:56:13PM +0300, Kirill Bychkov wrote:

> On Wed, December 6, 2017 14:37, Stuart Henderson wrote:
> > On 2017/12/06 11:49, Kirill Bychkov wrote:
> >> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
> >> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
> >> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
> >> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
> >> >>>> Hi!
> >> >>>> This patch enables build of libraw on other gcc4 arches, not only arm.
> >> >>>> Tested on macppc.
> >> >>>> OK?
> >> >>>
> >> >>> This looks heavy-handed to me, why extend this to all non-clang archs,
> >> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
> >> >>> build fail exactly?
> >> >>
> >> >> Without patch I see
> >> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
> >> >> (macppc) .
> >> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
> >> >>
> >> >> make show=ONLY_FOR_ARCHS
> >> >> aarch64 amd64 i386 arm
> >> >>
> >> >> With patch:
> >> >> make show=ONLY_FOR_ARCHS
> >> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
> >> >>
> >> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
> >> >> arches.
> >> >> See
> >> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
> >> >
> >> > ok, thanks for confirming.
> >> >
> >> >[...]
> >> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
> >> > end of COMPILER?
> >>
> >> macppc is quite happy with base-gcc, so it should be before ports-gcc. And
> >> for arm ports-gcc is the only solution I suppose (have no hw to test).
> >> So I see no other way to deal with arm other than this.
> >>
> > I think COMPILER should be removed here, seems it should probably
> > use this instead (untested):
> >
> > # XXX remove when armv7 switches to clang in base?
> > MODULES= gcc4
> > MODGCC4_ARCHS= arm
> > MODGCC4_LANGS= c++
> >
>
> Hello,
> Another look at the tree showed more incorrect removals of MODULES=gcc:
> in devel/libgit2/libgit2 [1] and devel/libmtp [2].
> So I propose to switch back to MODULES=gcc4 instead of COMPILEr and unlock
> building of this ports on most !clang archs.
> Builds fine on macppc (base-gcc) and amd64 (base-clang).
> OK? Comments?

This is a disastrous idea.

Learn to work with COMPILER, please.
Figure out the correct line in those cases.


The only case where direct use of gcc4 is justified is for languages outside
of C and C++.

Reply | Threaded
Open this post in threaded view
|

Re: COMPILER -> MODULES

Jeremie Courreges-Anglas-2
On Thu, Dec 07 2017, Marc Espie <[hidden email]> wrote:

> On Thu, Dec 07, 2017 at 05:56:13PM +0300, Kirill Bychkov wrote:
>> On Wed, December 6, 2017 14:37, Stuart Henderson wrote:
>> > On 2017/12/06 11:49, Kirill Bychkov wrote:
>> >> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
>> >> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>> >> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >> >>>> Hi!
>> >> >>>> This patch enables build of libraw on other gcc4 arches, not only arm.
>> >> >>>> Tested on macppc.
>> >> >>>> OK?
>> >> >>>
>> >> >>> This looks heavy-handed to me, why extend this to all non-clang archs,
>> >> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
>> >> >>> build fail exactly?
>> >> >>
>> >> >> Without patch I see
>> >> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>> >> >> (macppc) .
>> >> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>> >> >>
>> >> >> make show=ONLY_FOR_ARCHS
>> >> >> aarch64 amd64 i386 arm
>> >> >>
>> >> >> With patch:
>> >> >> make show=ONLY_FOR_ARCHS
>> >> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>> >> >>
>> >> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
>> >> >> arches.
>> >> >> See
>> >> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>> >> >
>> >> > ok, thanks for confirming.
>> >> >
>> >> >[...]
>> >> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
>> >> > end of COMPILER?
>> >>
>> >> macppc is quite happy with base-gcc, so it should be before ports-gcc. And
>> >> for arm ports-gcc is the only solution I suppose (have no hw to test).
>> >> So I see no other way to deal with arm other than this.
>> >>
>> > I think COMPILER should be removed here, seems it should probably
>> > use this instead (untested):
>> >
>> > # XXX remove when armv7 switches to clang in base?
>> > MODULES= gcc4
>> > MODGCC4_ARCHS= arm
>> > MODGCC4_LANGS= c++
>> >
>>
>> Hello,
>> Another look at the tree showed more incorrect removals of MODULES=gcc:
>> in devel/libgit2/libgit2 [1] and devel/libmtp [2].
>> So I propose to switch back to MODULES=gcc4 instead of COMPILEr and unlock
>> building of this ports on most !clang archs.
>> Builds fine on macppc (base-gcc) and amd64 (base-clang).
>> OK? Comments?
>
> This is a disastrous idea.
>
> Learn to work with COMPILER, please.
> Figure out the correct line in those cases.

Thanks for confirming, Marc.  This is similar to what I suggested for
libraw, and allows me to build libmtp on armv7:


Index: Makefile
===================================================================
RCS file: /d/cvs/ports/devel/libmtp/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile 16 Nov 2017 23:20:38 -0000 1.39
+++ Makefile 7 Dec 2017 15:29:45 -0000
@@ -16,9 +16,9 @@ WANTLIB += c gcrypt gpg-error iconv intl
 
 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libmtp/}
 
-# avoid "libmtp.so.7.0: undefined reference to `.L2085'"
-COMPILER= base-clang ports-gcc
+COMPILER= base-clang ports-gcc base-gcc
 COMPILER_LANGS= c
+# avoid "libmtp.so.7.0: undefined reference to `.L2085'"
 MODGCC4_ARCHS= mips64 mips64el
 
 LIB_DEPENDS= devel/libusb1 \



--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: COMPILER -> MODULES

Jeremie Courreges-Anglas-2
On Thu, Dec 07 2017, Jeremie Courreges-Anglas <[hidden email]> wrote:

> On Thu, Dec 07 2017, Marc Espie <[hidden email]> wrote:
>> On Thu, Dec 07, 2017 at 05:56:13PM +0300, Kirill Bychkov wrote:
>>> On Wed, December 6, 2017 14:37, Stuart Henderson wrote:
>>> > On 2017/12/06 11:49, Kirill Bychkov wrote:
>>> >> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
>>> >> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>>> >> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>>> >> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>>> >> >>>> Hi!
>>> >> >>>> This patch enables build of libraw on other gcc4 arches, not only arm.
>>> >> >>>> Tested on macppc.
>>> >> >>>> OK?
>>> >> >>>
>>> >> >>> This looks heavy-handed to me, why extend this to all non-clang archs,
>>> >> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does the
>>> >> >>> build fail exactly?
>>> >> >>
>>> >> >> Without patch I see
>>> >> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>>> >> >> (macppc) .
>>> >> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>>> >> >>
>>> >> >> make show=ONLY_FOR_ARCHS
>>> >> >> aarch64 amd64 i386 arm
>>> >> >>
>>> >> >> With patch:
>>> >> >> make show=ONLY_FOR_ARCHS
>>> >> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>>> >> >>
>>> >> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
>>> >> >> arches.
>>> >> >> See
>>> >> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>>> >> >
>>> >> > ok, thanks for confirming.
>>> >> >
>>> >> >[...]
>>> >> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
>>> >> > end of COMPILER?
>>> >>
>>> >> macppc is quite happy with base-gcc, so it should be before ports-gcc. And
>>> >> for arm ports-gcc is the only solution I suppose (have no hw to test).
>>> >> So I see no other way to deal with arm other than this.
>>> >>
>>> > I think COMPILER should be removed here, seems it should probably
>>> > use this instead (untested):
>>> >
>>> > # XXX remove when armv7 switches to clang in base?
>>> > MODULES= gcc4
>>> > MODGCC4_ARCHS= arm
>>> > MODGCC4_LANGS= c++
>>> >
>>>
>>> Hello,
>>> Another look at the tree showed more incorrect removals of MODULES=gcc:
>>> in devel/libgit2/libgit2 [1] and devel/libmtp [2].
>>> So I propose to switch back to MODULES=gcc4 instead of COMPILEr and unlock
>>> building of this ports on most !clang archs.
>>> Builds fine on macppc (base-gcc) and amd64 (base-clang).
>>> OK? Comments?
>>
>> This is a disastrous idea.
>>
>> Learn to work with COMPILER, please.
>> Figure out the correct line in those cases.
>
> Thanks for confirming, Marc.  This is similar to what I suggested for
> libraw, and allows me to build libmtp on armv7:

And similar diffs for libgit2 and libraw,


Index: devel/libgit2/libgit2/Makefile
===================================================================
RCS file: /d/cvs/ports/devel/libgit2/libgit2/Makefile,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile
--- devel/libgit2/libgit2/Makefile 16 Nov 2017 23:20:38 -0000 1.31
+++ devel/libgit2/libgit2/Makefile 7 Dec 2017 16:18:10 -0000
@@ -1,6 +1,5 @@
 # $OpenBSD: Makefile,v 1.31 2017/11/16 23:20:38 naddy Exp $
 
-BROKEN-hppa = no atomic ops
 COMMENT= the Git library, take 2
 
 GH_ACCOUNT = libgit2
@@ -14,10 +13,10 @@ MODULES= devel/cmake \
 
 MODPY_RUNDEP= No
 
-# for atomic builtins
-COMPILER= base-clang ports-gcc
+COMPILER= base-clang ports-gcc base-gcc
 COMPILER_LANGS= c
-MODGCC4_ARCHS= arm
+# for atomic builtins
+MODGCC4_ARCHS= arm hppa
 
 # bundles https://github.com/nodejs/http-parser
 LIB_DEPENDS= net/curl \
Index: graphics/libraw/Makefile
===================================================================
RCS file: /d/cvs/ports/graphics/libraw/Makefile,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile
--- graphics/libraw/Makefile 6 Dec 2017 17:46:51 -0000 1.30
+++ graphics/libraw/Makefile 7 Dec 2017 16:20:23 -0000
@@ -20,11 +20,9 @@ WANTLIB += c jasper jpeg lcms2 m pthread
 
 MASTER_SITES = https://www.libraw.org/data/
 
-MODULES = gcc4
+COMPILER = base-clang ports-gcc base-gcc
 # for atomic builtins (__sync_fetch_and_add_4)
-# XXX remove when armv7 switches to clang in base?
 MODGCC4_ARCHS = arm hppa
-MODGCC4_LANGS = c++
 
 LIB_DEPENDS = graphics/jasper \
  graphics/lcms2


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: COMPILER -> MODULES (Was: Re: enable build of graphics/libraw on gcc4 arches)

Kirill Bychkov
In reply to this post by Marc Espie-2
On Thu, December 7, 2017 17:56, Marc Espie wrote:

> On Thu, Dec 07, 2017 at 05:56:13PM +0300, Kirill Bychkov wrote:
>> On Wed, December 6, 2017 14:37, Stuart Henderson wrote:
>> > On 2017/12/06 11:49, Kirill Bychkov wrote:
>> >> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
>> >> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>> >> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>> >> >>>> Hi!
>> >> >>>> This patch enables build of libraw on other gcc4 arches, not only
>> arm.
>> >> >>>> Tested on macppc.
>> >> >>>> OK?
>> >> >>>
>> >> >>> This looks heavy-handed to me, why extend this to all non-clang
>> archs,
>> >> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does
>> the
>> >> >>> build fail exactly?
>> >> >>
>> >> >> Without patch I see
>> >> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>> >> >> (macppc) .
>> >> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>> >> >>
>> >> >> make show=ONLY_FOR_ARCHS
>> >> >> aarch64 amd64 i386 arm
>> >> >>
>> >> >> With patch:
>> >> >> make show=ONLY_FOR_ARCHS
>> >> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc sparc64
>> >> >>
>> >> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on most
>> >> >> arches.
>> >> >> See
>> >> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>> >> >
>> >> > ok, thanks for confirming.
>> >> >
>> >> >[...]
>> >> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
>> >> > end of COMPILER?
>> >>
>> >> macppc is quite happy with base-gcc, so it should be before ports-gcc.
>> And
>> >> for arm ports-gcc is the only solution I suppose (have no hw to test).
>> >> So I see no other way to deal with arm other than this.
>> >>
>> > I think COMPILER should be removed here, seems it should probably
>> > use this instead (untested):
>> >
>> > # XXX remove when armv7 switches to clang in base?
>> > MODULES= gcc4
>> > MODGCC4_ARCHS= arm
>> > MODGCC4_LANGS= c++
>> >
>>
>> Hello,
>> Another look at the tree showed more incorrect removals of MODULES=gcc:
>> in devel/libgit2/libgit2 [1] and devel/libmtp [2].
>> So I propose to switch back to MODULES=gcc4 instead of COMPILEr and unlock
>> building of this ports on most !clang archs.
>> Builds fine on macppc (base-gcc) and amd64 (base-clang).
>> OK? Comments?
>
> This is a disastrous idea.
>
> Learn to work with COMPILER, please.
> Figure out the correct line in those cases.

Re-reading bsd.port.mk manual and .mk files put everything on its place.
Sorry for the noise.

>
>
> The only case where direct use of gcc4 is justified is for languages outside
> of C and C++.
>


Reply | Threaded
Open this post in threaded view
|

Re: COMPILER -> MODULES

Kirill Bychkov
In reply to this post by Jeremie Courreges-Anglas-2
On Thu, December 7, 2017 18:39, Jeremie Courreges-Anglas wrote:

> On Thu, Dec 07 2017, Marc Espie <[hidden email]> wrote:
>> On Thu, Dec 07, 2017 at 05:56:13PM +0300, Kirill Bychkov wrote:
>>> On Wed, December 6, 2017 14:37, Stuart Henderson wrote:
>>> > On 2017/12/06 11:49, Kirill Bychkov wrote:
>>> >> On Wed, December 6, 2017 11:34, Jeremie Courreges-Anglas wrote:
>>> >> > On Wed, Dec 06 2017, "Kirill Bychkov" <[hidden email]> wrote:
>>> >> >> On Wed, December 6, 2017 03:23, Jeremie Courreges-Anglas wrote:
>>> >> >>> On Sun, Dec 03 2017, "Kirill Bychkov" <[hidden email]> wrote:
>>> >> >>>> Hi!
>>> >> >>>> This patch enables build of libraw on other gcc4 arches, not only
>>> arm.
>>> >> >>>> Tested on macppc.
>>> >> >>>> OK?
>>> >> >>>
>>> >> >>> This looks heavy-handed to me, why extend this to all non-clang
>>> archs,
>>> >> >>> afaik base-gcc has support for 4-bytes atomics on powerpc.  How does
>>> the
>>> >> >>> build fail exactly?
>>> >> >>
>>> >> >> Without patch I see
>>> >> >> ===>  libraw-0.18.5   is only for aarch64 amd64 i386 arm, not powerpc
>>> >> >> (macppc) .
>>> >> >> MODGCC4_ARCHS = arm somehow overrides ONLY_FOR_ARCHES:
>>> >> >>
>>> >> >> make show=ONLY_FOR_ARCHS
>>> >> >> aarch64 amd64 i386 arm
>>> >> >>
>>> >> >> With patch:
>>> >> >> make show=ONLY_FOR_ARCHS
>>> >> >> aarch64 amd64 i386 amd64 arm hppa i386 mips64 mips64el powerpc
>>> sparc64
>>> >> >>
>>> >> >> Switching MODULES=gcc4 to COMPILER=gcc made libraw unavailable on
>>> most
>>> >> >> arches.
>>> >> >> See
>>> >> >> http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/libraw/Makefile.diff?r1=1.24&r2=1.25
>>> >> >
>>> >> > ok, thanks for confirming.
>>> >> >
>>> >> >[...]
>>> >> > I guess it's fine, but isn't the shortest fix to add "base-gcc" at the
>>> >> > end of COMPILER?
>>> >>
>>> >> macppc is quite happy with base-gcc, so it should be before ports-gcc.
>>> And
>>> >> for arm ports-gcc is the only solution I suppose (have no hw to test).
>>> >> So I see no other way to deal with arm other than this.
>>> >>
>>> > I think COMPILER should be removed here, seems it should probably
>>> > use this instead (untested):
>>> >
>>> > # XXX remove when armv7 switches to clang in base?
>>> > MODULES= gcc4
>>> > MODGCC4_ARCHS= arm
>>> > MODGCC4_LANGS= c++
>>> >
>>>
>>> Hello,
>>> Another look at the tree showed more incorrect removals of MODULES=gcc:
>>> in devel/libgit2/libgit2 [1] and devel/libmtp [2].
>>> So I propose to switch back to MODULES=gcc4 instead of COMPILEr and unlock
>>> building of this ports on most !clang archs.
>>> Builds fine on macppc (base-gcc) and amd64 (base-clang).
>>> OK? Comments?
>>
>> This is a disastrous idea.
>>
>> Learn to work with COMPILER, please.
>> Figure out the correct line in those cases.
>
> Thanks for confirming, Marc.  This is similar to what I suggested for
> libraw, and allows me to build libmtp on armv7:
>
>
> Index: Makefile
> ===================================================================
> RCS file: /d/cvs/ports/devel/libmtp/Makefile,v
> retrieving revision 1.39
> diff -u -p -r1.39 Makefile
> --- Makefile 16 Nov 2017 23:20:38 -0000 1.39
> +++ Makefile 7 Dec 2017 15:29:45 -0000
> @@ -16,9 +16,9 @@ WANTLIB += c gcrypt gpg-error iconv intl
>
>  MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libmtp/}
>
> -# avoid "libmtp.so.7.0: undefined reference to `.L2085'"
> -COMPILER= base-clang ports-gcc
> +COMPILER= base-clang ports-gcc base-gcc
>  COMPILER_LANGS= c
> +# avoid "libmtp.so.7.0: undefined reference to `.L2085'"
>  MODGCC4_ARCHS= mips64 mips64el
>
>  LIB_DEPENDS= devel/libusb1 \
>
>

After attentive reading of manuals I've finally got how this works.
I was confused by MODGCC4_* vars in my understaning.
Works on macppc. OK with me.