Skip Menu |
Report information
Id: 132704
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: tomhukins <tom [at] eborcom.com>
Cc:
AdminCc:

Operating System: freebsd
PatchStatus: (no value)
Severity: low
Type: install
Perl Version: 5.24.1
Fixed In: (no value)

Attachments
0001-Set-more-sensible-O-optimization-on-FreeBSD.patch



From: tom [...] eborcom.com
Date: Wed, 10 Jan 2018 19:00:46 +0000
Subject: [PATCH] Set more sensible -O optimization on FreeBSD
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 3.9k
This is a bug report for perl from tom@eborcom.com, generated with the help of perlbug 1.40 running under perl 5.24.1. ----------------------------------------------------------------- [Please describe your issue here] The attached patch sets a more sensible, standard optimization flag on FreeBSD. Other platforms use a similar value to build perl, as does FreeBSD's ports system. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=install severity=low Type=Patch PatchStatus=HasPatch --- Site configuration information for perl 5.24.1: Configured by perl at Wed Oct 12 21:42:09 UTC 2016. Summary of my perl5 (revision 5 version 24 subversion 1) configuration: Platform: osname=freebsd, osvers=9.3-release-p52, archname=amd64-freebsd-thread-multi uname='freebsd 93amd64-default-job-01 9.3-release-p52 freebsd 9.3-release-p52 amd64 ' config_args='-sde -Dprefix=/usr/local -Dlibperl=libperl.so.5.24.1 -Darchlib=/usr/local/lib/perl5/5.24/mach -Dprivlib=/usr/local/lib/perl5/5.24 -Dman3dir=/usr/local/lib/perl5/5.24/perl/man/man3 -Dman1dir=/usr/local/lib/perl5/5.24/perl/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/mach/5.24 -Dsitelib=/usr/local/lib/perl5/site_perl -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/site_perl/man/man3 -Dsiteman1dir=/usr/local/lib/perl5/site_perl/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dusenm=n -Dcc=cc -Duseshrplib -Dinc_version_list=none -Dcf_by=perl -Dcf_email=perl@FreeBSD.org -Dcf_time=Wed Oct 12 21:42:09 UTC 2016 -Alddlflags=-L/wrkdirs/usr/ports/lang/perl5.24/work/perl-5.24.1-RC4 -L/usr/local/lib/perl5/5.24/mach/CORE -lperl -Dshrpldflags=$(LDDLFLAGS:N-L/wrkdirs/usr/ports/lang/perl5.24/work/perl-5.24.1-RC4:N-L/usr/local/lib/perl5/5.24/mach/CORE:N-lperl) -Wl,-soname,$(LIBPERL:R) -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing -Ui_gdbm -Dusemultiplicity=y -Duse64bitint -Dusethreads=y -Dusemymalloc=n -Uusedtrace' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2', optimize='-O2 -pipe -fstack-protector -fno-strict-aliasing', cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.2.1 20070831 patched [FreeBSD]', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags ='-lpthread -Wl,-E -fstack-protector -L/usr/local/lib' libpth=/usr/lib /usr/local/lib /usr/include/gcc/4.2 /usr/lib libs=-lpthread -lm -lcrypt -lutil perllibs=-lpthread -lm -lcrypt -lutil libc=, so=so, useshrplib=true, libperl=libperl.so.5.24.1 gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.24/mach/CORE' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib/perl5/5.24/mach/CORE -lperl -L/usr/local/lib -fstack-protector' Locally applied patches: RC4 --- @INC for perl 5.24.1: lib /usr/local/lib/perl5/site_perl/mach/5.24 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.24/mach /usr/local/lib/perl5/5.24 --- Environment for perl 5.24.1: HOME=/home/tom LANG=en_GB.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/tom/bin PERL_BADLANG (unset) SHELL=/usr/local/bin/zsh

Message body is not shown because sender requested not to inline it.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 211b
I don't think lagging behind what FreeBSD does is a great idea. It would probably be just as good to inherit CFLAGS set by the OS and or the user using something like: $ make -f /dev/null -V CFLAGS -O2 -pipe
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 208b
It would inherit the right value depending on the architecture being built: $ env MACHINE_ARCH=mips64 make -f /dev/null -V CFLAGS -O -pipe -G0 $ env MACHINE_ARCH=aarch64 make -f /dev/null -V CFLAGS -O2 -pipe
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 290b
On Wed, 10 Jan 2018 11:38:50 -0800, tomhukins wrote: Show quoted text
> The attached patch sets a more sensible, standard optimization flag on > FreeBSD. Other platforms use a similar value to build perl, as does > FreeBSD's ports system.
Thanks, applied as 4d8d7a4152178168855cb6a4506025a5d82465c7. Tony
RT-Send-CC: mat [...] cpan.org
Download (untitled) / with headers
text/plain 629b
On Tue, 16 Jan 2018 05:19:05 GMT, tonyc wrote: Show quoted text
> On Wed, 10 Jan 2018 11:38:50 -0800, tomhukins wrote:
> > The attached patch sets a more sensible, standard optimization flag on > > FreeBSD. Other platforms use a similar value to build perl, as does > > FreeBSD's ports system.
> > Thanks, applied as 4d8d7a4152178168855cb6a4506025a5d82465c7. > > Tony
Tony, can you elaborate a bit more on why you applied this patch despite the objection of the Perl maintainer for FreeBSD? I'm not saying Mat is definitely correct, but I think his statements should be addressed. Thank you very much. -- James E Keenan (jkeenan@cpan.org)
To: Mathieu Arnold via RT <perlbug-followup [...] perl.org>
Subject: Re: [perl #132704] [PATCH] Set more sensible -O optimization on FreeBSD
From: Tom Hukins <tom [...] eborcom.com>
Date: Tue, 16 Jan 2018 13:31:28 +0000
Download (untitled) / with headers
text/plain 324b
On Thu, Jan 11, 2018 at 05:30:13AM -0800, Mathieu Arnold via RT wrote: Show quoted text
> I don't think lagging behind what FreeBSD does is a great idea.
I agree there's scope for future improvement. However, reusing the approach from other hints/*.sh files seems an improvement over the old behaviour of building with -O everywhere. Tom
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 901b
On Tue, 16 Jan 2018 05:14:47 -0800, jkeenan wrote: Show quoted text
> On Tue, 16 Jan 2018 05:19:05 GMT, tonyc wrote:
> > On Wed, 10 Jan 2018 11:38:50 -0800, tomhukins wrote:
> > > The attached patch sets a more sensible, standard optimization flag > > > on > > > FreeBSD. Other platforms use a similar value to build perl, as > > > does > > > FreeBSD's ports system.
> > > > Thanks, applied as 4d8d7a4152178168855cb6a4506025a5d82465c7. > > > > Tony
> > Tony, can you elaborate a bit more on why you applied this patch > despite the objection of the Perl maintainer for FreeBSD? > > I'm not saying Mat is definitely correct, but I think his statements > should be addressed.
I wasn't aware he was the FreeBSD maintainer. In general we don't have Configure inherit from the environment, though someone building perl can certain do that by passing "-Dccflags=$CFLAGS" or similar on the Configure command line. Tony
Download (untitled) / with headers
text/plain 317b
Thank you for filing this report. You have helped make Perl better. With the release yesterday of Perl 5.28.0, this and 185 other issues have been resolved. Perl 5.28.0 may be downloaded via: https://metacpan.org/release/XSAWYERX/perl-5.28.0 If you find that the problem persists, feel free to reopen this ticket.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org