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'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 <<a href=3D"mailto:diizzy@= freebsd.org">diizzy@freebsd.org</a>> 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> > The branch main has been updated by pizzamig:<br> > <br> > URL:<br> > <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> > <br> > commit 1453ec9ec99d5025678acb403c9f84c7beb6dbd5<br> > Author:=C2=A0 =C2=A0 =C2=A0Luca Pizzamiglio <pizzamig@FreeBSD.org&g= t;<br> > AuthorDate: 2023-03-26 11:49:14 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Luca Pizzamiglio <pizzamig@FreeBSD.org&g= t;<br> > CommitDate: 2023-03-26 11:49:14 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0benchmarks/unixbench: Fix arm64 build<br> > <br> >=C2=A0 =C2=A0 =C2=A0On arm64, some cflags are not supported.<br> > ---<br> >=C2=A0 benchmarks/unixbench/files/patch-Makefile | 21 +++++++----------= ----<br> >=C2=A0 1 file changed, 7 insertions(+), 14 deletions(-)<br> > <br> > diff --git a/benchmarks/unixbench/files/patch-Makefile<br> > b/benchmarks/unixbench/files/patch-Makefile<br> > index 282945fef972..3c2539dc046d 100644<br> > --- a/benchmarks/unixbench/files/patch-Makefile<br> > +++ b/benchmarks/unixbench/files/patch-Makefile<br> > @@ -1,5 +1,5 @@<br> >=C2=A0 --- Makefile.orig=C2=A0 =C2=A0 2023-02-07 23:18:07.000000000 +01= 00<br> > -+++ Makefile 2023-02-09 21:57:42.966634000 +0100<br> > ++++ Makefile 2023-03-26 13:40:57.699042000 +0200<br> >=C2=A0 @@ -46,7 +46,7 @@<br> >=C2=A0 =C2=A0# X11 libraries on your system. (e.g. libX11-devel mesa-li= bGL-devel)<br> >=C2=A0 =C2=A0#<br> > @@ -18,22 +18,15 @@<br> > <br> >=C2=A0 =C2=A0# OPTIMISATION SETTINGS:<br> >=C2=A0 =C2=A0# Use gcc option if defined UB_GCC_OPTIONS via "Envir= onment<br> > variable" or "Command-line arguments".<br> > -@@ -87,7 +87,7 @@<br> > -=C2=A0 =C2=A0## (-ffast-math) disables strict IEEE or ISO rules/speci= fications<br> > for math funcs<br> > -=C2=A0 =C2=A0OPTON =3D -O3 -ffast-math<br> > -<br> > --=C2=A0 ## OS detection.=C2=A0 Comment out if gmake syntax not suppor= ted by<br> > other 'make'.<br> > -+=C2=A0 ## OS detection.=C2=A0 Comment out if gmake syntax not suppor= ted by <br> > other 'make'.<br> > -=C2=A0 =C2=A0OSNAME:=3D$(shell uname -s)<br> > -=C2=A0 =C2=A0ARCH :=3D $(shell uname -p)<br> > -=C2=A0 =C2=A0ifeq ($(OSNAME),Linux)<br> > -@@ -113,6 +113,9 @@<br> > +@@ -113,6 +113,13 @@<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0CFLAGS +=3D -Wa,-q<br> >=C2=A0 =C2=A0 =C2=A0endif<br> > <br> >=C2=A0 +=C2=A0 ifeq ($(OSNAME),FreeBSD)<br> > -+=C2=A0 =C2=A0 OPTON +=3D -march=3Dnative -mtune=3Dnative -fomit-fram= e-pointer<br> > ++=C2=A0 =C2=A0 ifeq ($(ARCH),aarch64)<br> > ++=C2=A0 =C2=A0 =C2=A0 OPTON +=3D -fomit-frame-pointer<br> > ++=C2=A0 =C2=A0 else<br> > ++=C2=A0 =C2=A0 =C2=A0 OPTON +=3D -march=3Dnative -mtune=3Dnative -fom= it-frame-pointer<br> > ++=C2=A0 =C2=A0 endif<br> >=C2=A0 +=C2=A0 endif<br> >=C2=A0 =C2=A0endif<br> > -<br> > -<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>