Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2023 16:43:23 +0200
From:      Luca Pizzamiglio <pizzamig@freebsd.org>
To:        Daniel Engberg <diizzy@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org,  dev-commits-ports-main@freebsd.org
Subject:   Re: git: 1453ec9ec99d - main - benchmarks/unixbench: Fix arm64 build
Message-ID:  <CAB88xy-873z63G2LTcgpw1vWzq2gLDWAPy3jgsfP8f-Cq8H_4w@mail.gmail.com>
In-Reply-To: <906fc94ce07248d8aa56678fcc1b178b@FreeBSD.org>
References:  <202303261149.32QBnc5d024941@gitrepo.freebsd.org> <906fc94ce07248d8aa56678fcc1b178b@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000b8c75305f7cea69a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thanks for the suggestions!
I'm leaving mtune as default, and adding an option to enable march.

mtune is expected to not create broken packages.
Am I correct?

Best regards,
Luca


On Sun, Mar 26, 2023 at 1:58=E2=80=AFPM Daniel Engberg <diizzy@freebsd.org>=
 wrote:

> On 2023-03-26 13:49, Luca Pizzamiglio wrote:
> > The branch main has been updated by pizzamig:
> >
> > URL:
> >
> https://cgit.FreeBSD.org/ports/commit/?id=3D1453ec9ec99d5025678acb403c9f8=
4c7beb6dbd5
> >
> > commit 1453ec9ec99d5025678acb403c9f84c7beb6dbd5
> > Author:     Luca Pizzamiglio <pizzamig@FreeBSD.org>
> > AuthorDate: 2023-03-26 11:49:14 +0000
> > Commit:     Luca Pizzamiglio <pizzamig@FreeBSD.org>
> > CommitDate: 2023-03-26 11:49:14 +0000
> >
> >     benchmarks/unixbench: Fix arm64 build
> >
> >     On arm64, some cflags are not supported.
> > ---
> >  benchmarks/unixbench/files/patch-Makefile | 21 +++++++--------------
> >  1 file changed, 7 insertions(+), 14 deletions(-)
> >
> > diff --git a/benchmarks/unixbench/files/patch-Makefile
> > b/benchmarks/unixbench/files/patch-Makefile
> > index 282945fef972..3c2539dc046d 100644
> > --- a/benchmarks/unixbench/files/patch-Makefile
> > +++ b/benchmarks/unixbench/files/patch-Makefile
> > @@ -1,5 +1,5 @@
> >  --- Makefile.orig    2023-02-07 23:18:07.000000000 +0100
> > -+++ Makefile 2023-02-09 21:57:42.966634000 +0100
> > ++++ Makefile 2023-03-26 13:40:57.699042000 +0200
> >  @@ -46,7 +46,7 @@
> >   # X11 libraries on your system. (e.g. libX11-devel mesa-libGL-devel)
> >   #
> > @@ -18,22 +18,15 @@
> >
> >   # OPTIMISATION SETTINGS:
> >   # Use gcc option if defined UB_GCC_OPTIONS via "Environment
> > variable" or "Command-line arguments".
> > -@@ -87,7 +87,7 @@
> > -   ## (-ffast-math) disables strict IEEE or ISO rules/specifications
> > for math funcs
> > -   OPTON =3D -O3 -ffast-math
> > -
> > --  ## OS detection.  Comment out if gmake syntax not supported by
> > other 'make'.
> > -+  ## OS detection.  Comment out if gmake syntax not supported by
> > other 'make'.
> > -   OSNAME:=3D$(shell uname -s)
> > -   ARCH :=3D $(shell uname -p)
> > -   ifeq ($(OSNAME),Linux)
> > -@@ -113,6 +113,9 @@
> > +@@ -113,6 +113,13 @@
> >       CFLAGS +=3D -Wa,-q
> >     endif
> >
> >  +  ifeq ($(OSNAME),FreeBSD)
> > -+    OPTON +=3D -march=3Dnative -mtune=3Dnative -fomit-frame-pointer
> > ++    ifeq ($(ARCH),aarch64)
> > ++      OPTON +=3D -fomit-frame-pointer
> > ++    else
> > ++      OPTON +=3D -march=3Dnative -mtune=3Dnative -fomit-frame-pointer
> > ++    endif
> >  +  endif
> >   endif
> > -
> > -
>
> Hi,
>
> Please remove -march=3Dnative as it will break on x86/amd64 for packaging=
.
> Either add it as a menu option or just rely on ports framework (CPUTYPE
> in make.conf).
>
> Best regards,
> Daniel
>

--000000000000b8c75305f7cea69a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks for the suggestions!<br>I&#39;m leaving mtune as de=
fault, and adding an option to enable march.<br><div><br></div><div>mtune i=
s expected to not create broken packages.</div><div>Am I correct?<br><br></=
div><div>Best regards,<br></div><div>Luca<br></div><div><br></div></div><br=
><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, M=
ar 26, 2023 at 1:58=E2=80=AFPM Daniel Engberg &lt;<a href=3D"mailto:diizzy@=
freebsd.org">diizzy@freebsd.org</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">On 2023-03-26 13:49, Luca Pizzamiglio wrot=
e:<br>
&gt; The branch main has been updated by pizzamig:<br>
&gt; <br>
&gt; URL:<br>
&gt; <a href=3D"https://cgit.FreeBSD.org/ports/commit/?id=3D1453ec9ec99d502=
5678acb403c9f84c7beb6dbd5" rel=3D"noreferrer" target=3D"_blank">https://cgi=
t.FreeBSD.org/ports/commit/?id=3D1453ec9ec99d5025678acb403c9f84c7beb6dbd5</=
a><br>
&gt; <br>
&gt; commit 1453ec9ec99d5025678acb403c9f84c7beb6dbd5<br>
&gt; Author:=C2=A0 =C2=A0 =C2=A0Luca Pizzamiglio &lt;pizzamig@FreeBSD.org&g=
t;<br>
&gt; AuthorDate: 2023-03-26 11:49:14 +0000<br>
&gt; Commit:=C2=A0 =C2=A0 =C2=A0Luca Pizzamiglio &lt;pizzamig@FreeBSD.org&g=
t;<br>
&gt; CommitDate: 2023-03-26 11:49:14 +0000<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0benchmarks/unixbench: Fix arm64 build<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0On arm64, some cflags are not supported.<br>
&gt; ---<br>
&gt;=C2=A0 benchmarks/unixbench/files/patch-Makefile | 21 +++++++----------=
----<br>
&gt;=C2=A0 1 file changed, 7 insertions(+), 14 deletions(-)<br>
&gt; <br>
&gt; diff --git a/benchmarks/unixbench/files/patch-Makefile<br>
&gt; b/benchmarks/unixbench/files/patch-Makefile<br>
&gt; index 282945fef972..3c2539dc046d 100644<br>
&gt; --- a/benchmarks/unixbench/files/patch-Makefile<br>
&gt; +++ b/benchmarks/unixbench/files/patch-Makefile<br>
&gt; @@ -1,5 +1,5 @@<br>
&gt;=C2=A0 --- Makefile.orig=C2=A0 =C2=A0 2023-02-07 23:18:07.000000000 +01=
00<br>
&gt; -+++ Makefile 2023-02-09 21:57:42.966634000 +0100<br>
&gt; ++++ Makefile 2023-03-26 13:40:57.699042000 +0200<br>
&gt;=C2=A0 @@ -46,7 +46,7 @@<br>
&gt;=C2=A0 =C2=A0# X11 libraries on your system. (e.g. libX11-devel mesa-li=
bGL-devel)<br>
&gt;=C2=A0 =C2=A0#<br>
&gt; @@ -18,22 +18,15 @@<br>
&gt; <br>
&gt;=C2=A0 =C2=A0# OPTIMISATION SETTINGS:<br>
&gt;=C2=A0 =C2=A0# Use gcc option if defined UB_GCC_OPTIONS via &quot;Envir=
onment<br>
&gt; variable&quot; or &quot;Command-line arguments&quot;.<br>
&gt; -@@ -87,7 +87,7 @@<br>
&gt; -=C2=A0 =C2=A0## (-ffast-math) disables strict IEEE or ISO rules/speci=
fications<br>
&gt; for math funcs<br>
&gt; -=C2=A0 =C2=A0OPTON =3D -O3 -ffast-math<br>
&gt; -<br>
&gt; --=C2=A0 ## OS detection.=C2=A0 Comment out if gmake syntax not suppor=
ted by<br>
&gt; other &#39;make&#39;.<br>
&gt; -+=C2=A0 ## OS detection.=C2=A0 Comment out if gmake syntax not suppor=
ted by <br>
&gt; other &#39;make&#39;.<br>
&gt; -=C2=A0 =C2=A0OSNAME:=3D$(shell uname -s)<br>
&gt; -=C2=A0 =C2=A0ARCH :=3D $(shell uname -p)<br>
&gt; -=C2=A0 =C2=A0ifeq ($(OSNAME),Linux)<br>
&gt; -@@ -113,6 +113,9 @@<br>
&gt; +@@ -113,6 +113,13 @@<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0CFLAGS +=3D -Wa,-q<br>
&gt;=C2=A0 =C2=A0 =C2=A0endif<br>
&gt; <br>
&gt;=C2=A0 +=C2=A0 ifeq ($(OSNAME),FreeBSD)<br>
&gt; -+=C2=A0 =C2=A0 OPTON +=3D -march=3Dnative -mtune=3Dnative -fomit-fram=
e-pointer<br>
&gt; ++=C2=A0 =C2=A0 ifeq ($(ARCH),aarch64)<br>
&gt; ++=C2=A0 =C2=A0 =C2=A0 OPTON +=3D -fomit-frame-pointer<br>
&gt; ++=C2=A0 =C2=A0 else<br>
&gt; ++=C2=A0 =C2=A0 =C2=A0 OPTON +=3D -march=3Dnative -mtune=3Dnative -fom=
it-frame-pointer<br>
&gt; ++=C2=A0 =C2=A0 endif<br>
&gt;=C2=A0 +=C2=A0 endif<br>
&gt;=C2=A0 =C2=A0endif<br>
&gt; -<br>
&gt; -<br>
<br>
Hi,<br>
<br>
Please remove -march=3Dnative as it will break on x86/amd64 for packaging. =
<br>
Either add it as a menu option or just rely on ports framework (CPUTYPE <br=
>
in make.conf).<br>
<br>
Best regards,<br>
Daniel<br>
</blockquote></div>

--000000000000b8c75305f7cea69a--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAB88xy-873z63G2LTcgpw1vWzq2gLDWAPy3jgsfP8f-Cq8H_4w>