Re: CFLAGS for certain ports
Hi :) On Sat, Mar 4, 2017 at 4:16 AM, Shane Ambler wrote: > On 04/03/2017 02:17, Julian Elischer wrote: >> >> On 2/3/17 8:58 pm, Dimitry Andric wrote: >>> >>> On 2 Mar 2017, at 12:02, Mingo Rrubioer wrote: I would like to see how well FreeBSD does as a workstation OS in the HPC world due to its stability and reliability, as well as LLVM/clang. I would like to know if FreeBSD has something similar to Gentoo's /etc/portage/make.conf file and /etc/portage/package.use/* files in order to compile certain ports with certain compiler flags. >>> >>> It doesn't, though it would certainly be nice to have something like it >>> at some point. The current idiom is to put something similar to the >>> following in your /etc/make.conf: >>> >>> .if ${.CURDIR:M/usr/ports/foo/bar} >>> CFLAGS+= [... flags for the foo/bar port ...] >>> .endif >>> >>> .if ${.CURDIR:M/usr/ports/what/ever} >>> CFLAGS+= [... flags for the what/ever port ...] >>> .endif >>> > > We can also put a Makefile.local in the port directory. There can also > be arch and system specific makefiles. > > See /usr/ports/Mk/bsd.port.mk from about line 1211 > > https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?view=markup#l1211 Thanks to everyone and sorry for the late reply. Great help and pointers !!! This is going to be a slow process (you know how users love change ;) I have to get things well sorted aout, benchmarks, ... before I can convince anyone ... But, it's worth it ;) Back to reading man pages ;) ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: CFLAGS for certain ports
On 04/03/2017 02:17, Julian Elischer wrote: On 2/3/17 8:58 pm, Dimitry Andric wrote: On 2 Mar 2017, at 12:02, Mingo Rrubioer wrote: I would like to see how well FreeBSD does as a workstation OS in the HPC world due to its stability and reliability, as well as LLVM/clang. I would like to know if FreeBSD has something similar to Gentoo's /etc/portage/make.conf file and /etc/portage/package.use/* files in order to compile certain ports with certain compiler flags. It doesn't, though it would certainly be nice to have something like it at some point. The current idiom is to put something similar to the following in your /etc/make.conf: .if ${.CURDIR:M/usr/ports/foo/bar} CFLAGS+= [... flags for the foo/bar port ...] .endif .if ${.CURDIR:M/usr/ports/what/ever} CFLAGS+= [... flags for the what/ever port ...] .endif We can also put a Makefile.local in the port directory. There can also be arch and system specific makefiles. See /usr/ports/Mk/bsd.port.mk from about line 1211 https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?view=markup#l1211 -- FreeBSD - the place to B...Software Developing Shane Ambler ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: CFLAGS for certain ports
On 2/3/17 8:58 pm, Dimitry Andric wrote: On 2 Mar 2017, at 12:02, Mingo Rrubioer wrote: I would like to see how well FreeBSD does as a workstation OS in the HPC world due to its stability and reliability, as well as LLVM/clang. I would like to know if FreeBSD has something similar to Gentoo's /etc/portage/make.conf file and /etc/portage/package.use/* files in order to compile certain ports with certain compiler flags. It doesn't, though it would certainly be nice to have something like it at some point. The current idiom is to put something similar to the following in your /etc/make.conf: .if ${.CURDIR:M/usr/ports/foo/bar} CFLAGS+= [... flags for the foo/bar port ...] .endif .if ${.CURDIR:M/usr/ports/what/ever} CFLAGS+= [... flags for the what/ever port ...] .endif Regarding LLVM/clang, I've been reading the documentation and found these flags: -arch=, -march=, -mcpu=, --target=, target-cpu . I'm not quite sure which one would be the one to use. In case someone wants to know, my initial play/test machine has this processor: CPU: Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (3600.11-MHz K8-class CPU) Origin="GenuineIntel" Id=0x206d7 Family=0x6 Model=0x2d Stepping=7 And I'm currently running: 11.0-RELEASE-p8. So I imagine I should use something like CFLAGS+= -march=corei7-avx -march=sandybridge -target-cpu. Is that correct? Don't specify -march or -mcpu directly, but add the following line to /etc/make.conf: CPUTYPE?= native This will take care of everything automatically. See also make.conf(5). -Dimitry Many many 3rd party packages use a consistent set of variables fed into the automumble tools. Only today I was pleasantly surprised to see the lftp port pick up my CFLAGS and LDFLAGS changes without me having to change anything in the ports themselves.. we should investigate what these defacto stndards are and document them ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: CFLAGS for certain ports
On Thu, Mar 2, 2017 at 5:58 AM, Dimitry Andric wrote: > On 2 Mar 2017, at 12:02, Mingo Rrubioer wrote: >> >> I would like to see how well FreeBSD does as a workstation OS in the >> HPC world due to its stability and reliability, as well as LLVM/clang. >> I would like to know if FreeBSD has something similar to Gentoo's >> /etc/portage/make.conf file and /etc/portage/package.use/* files in >> order to compile certain ports with certain compiler flags. > > It doesn't, though it would certainly be nice to have something like it > at some point. The current idiom is to put something similar to the > following in your /etc/make.conf: > > .if ${.CURDIR:M/usr/ports/foo/bar} > CFLAGS+= [... flags for the foo/bar port ...] > .endif > > .if ${.CURDIR:M/usr/ports/what/ever} > CFLAGS+= [... flags for the what/ever port ...] > .endif Actually, you can enable options on a per-port basis by creating a file named /var/db/ports/_/options. Those are the files that get created whenever you do "make config" in a port directory. It's usually easiest to create them interactively just by doing "make config" though. > > >> Regarding LLVM/clang, I've been reading the documentation and found >> these flags: -arch=, -march=, -mcpu=, >> --target=, target-cpu . I'm not quite sure which >> one would be the one to use. In case someone wants to know, my initial >> play/test machine has this processor: >> >> CPU: Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (3600.11-MHz K8-class CPU) >> Origin="GenuineIntel" Id=0x206d7 Family=0x6 Model=0x2d Stepping=7 >> >> And I'm currently running: 11.0-RELEASE-p8. >> >> So I imagine I should use something like CFLAGS+= -march=corei7-avx >> -march=sandybridge -target-cpu. Is that correct? > > Don't specify -march or -mcpu directly, but add the following line to > /etc/make.conf: > > CPUTYPE?= native > > This will take care of everything automatically. See also make.conf(5). > > -Dimitry > ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: CFLAGS for certain ports
On 2 Mar 2017, at 12:02, Mingo Rrubioer wrote: > > I would like to see how well FreeBSD does as a workstation OS in the > HPC world due to its stability and reliability, as well as LLVM/clang. > I would like to know if FreeBSD has something similar to Gentoo's > /etc/portage/make.conf file and /etc/portage/package.use/* files in > order to compile certain ports with certain compiler flags. It doesn't, though it would certainly be nice to have something like it at some point. The current idiom is to put something similar to the following in your /etc/make.conf: .if ${.CURDIR:M/usr/ports/foo/bar} CFLAGS+= [... flags for the foo/bar port ...] .endif .if ${.CURDIR:M/usr/ports/what/ever} CFLAGS+= [... flags for the what/ever port ...] .endif > Regarding LLVM/clang, I've been reading the documentation and found > these flags: -arch=, -march=, -mcpu=, > --target=, target-cpu . I'm not quite sure which > one would be the one to use. In case someone wants to know, my initial > play/test machine has this processor: > > CPU: Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (3600.11-MHz K8-class CPU) > Origin="GenuineIntel" Id=0x206d7 Family=0x6 Model=0x2d Stepping=7 > > And I'm currently running: 11.0-RELEASE-p8. > > So I imagine I should use something like CFLAGS+= -march=corei7-avx > -march=sandybridge -target-cpu. Is that correct? Don't specify -march or -mcpu directly, but add the following line to /etc/make.conf: CPUTYPE?= native This will take care of everything automatically. See also make.conf(5). -Dimitry signature.asc Description: Message signed with OpenPGP
CFLAGS for certain ports
Hello, New to FreeBSD and first post. If I got the wrong mailing list, just let me know where to ask my questions. I would like to see how well FreeBSD does as a workstation OS in the HPC world due to its stability and reliability, as well as LLVM/clang. I would like to know if FreeBSD has something similar to Gentoo's /etc/portage/make.conf file and /etc/portage/package.use/* files in order to compile certain ports with certain compiler flags. Currently I mainly use CFLAGS="-O2 -pipe -mtune=native" for most of the applications, so nothing really aggressive (in general). I've been reading through some FreeBSD docs (Handbook and ports documentation) but haven't found the answer (maybe looking in the wrong place). Regarding LLVM/clang, I've been reading the documentation and found these flags: -arch=, -march=, -mcpu=, --target=, target-cpu . I'm not quite sure which one would be the one to use. In case someone wants to know, my initial play/test machine has this processor: CPU: Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (3600.11-MHz K8-class CPU) Origin="GenuineIntel" Id=0x206d7 Family=0x6 Model=0x2d Stepping=7 And I'm currently running: 11.0-RELEASE-p8. So I imagine I should use something like CFLAGS+= -march=corei7-avx -march=sandybridge -target-cpu. Is that correct? Currently all our deployed workstations are Intel with NVIDIA Quadro graphics cards. My target is not to migrate everything, I just want to know if FreeBSD would be suitable and where. As I mentioned, this would be for specific scientific applications, not system wide. Thanks !! ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"