In Perl the 'do' construct has some odd side-effects regarding $@,
$!, and return values (i.e. 'do'ing a file which evaluates to undef
can be a little ambiguous).
Instead, generate a preamble to the Makefile.PL and execute it as
stdin.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
It seems that Inline::C evaluates to undef which is problematic, so
we need to handle this better.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
There are a few packages which mysteriously fail during the configure
stage. Give us better means of understanding why.
Also, some Makefile.PL's have "use" statements which reference
files which are in or under ".".
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
5.26.1 introduced default_inc_excludes_dot which is causing
perl-html-tags and possibly other modules to fail. Add explict
dot back when invoking module's ./Makefile.PL.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Required changes:
* Add qualifying '.' to scripts or to @INC, as appropriate since we're
enabling default_inc_excludes_dot;
* Add new platform/library definitions like double-double format and
locale library functions/headers;
* Delete patch 020 as it's been upstreamed;
Optional changes:
* Instead of using -@rm and having that fail, emit an error message,
and be ignored, just use @rm -f instead which will always succeed.
Security
[CVE-2017-12837] Heap buffer overflow in regular expression compiler
Compiling certain regular expression patterns with the case-insensitive
modifier could cause a heap buffer overflow and crash perl. This has
now been fixed. [perl #131582]
[CVE-2017-12883] Buffer over-read in regular expression parser
For certain types of syntax error in a regular expression pattern, the
error message could either contain the contents of a random, possibly
large, chunk of memory, or could crash perl. This has now been fixed.
[perl #131598]
[CVE-2017-12814] $ENV{$key} stack buffer overflow on Windows
A possible stack buffer overflow in the %ENV code on Windows has been
fixed by removing the buffer completely since it was superfluous anyway.
[perl #131665]
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Certain strings are misinterpreted as comments by perlmod.mk and removed
when they shouldn't be (in particular, perl-cgi). Enable this whenever
you have sufficient flash space.
Globally, CONFIG_PERL_NOCOMMENT=y (default) causes comments to be stripped
as before. However, a package (like perl-cgi) can override this with
PKG_LEAVE_COMMENTS=1.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
As both LEDE and OpenWrt have STAGING_DIR_HOSTPKG now, we can start to rely
on it. See 73b7f55424 for more information on
STAGING_DIR_HOSTPKG.
STAGING_DIR_HOSTPKG won't actually be changed before the first LEDE release
(it is equivalent to $(STAGING_DIR)/host), so this simple search/replace
cleanup is safe to apply. Doing this cleanup now will be useful for the
Gluon project (an OpenWrt/LEDE based firmware framework) for experimenting
with modifying STAGING_DIR_HOSTPKG before doing this in the LEDE upstream.
Also fixes a typo in the dbus Makefile ("STAGIND_DIR").
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This will not change any existing packages' functionality. All packages
that used this symbol before during build(with it's value being "cc -E") most
likely would've failed compilation.
Note that this change is only in effect during build.
Signed-off-by: Marcel Denia <naoir@gmx.net>
In case threading is enabled, perl is compiled with -D_REENTRANT
and -D_GNU_SOURCE, which, apart from other things, enables usage
of off64_t. As we override module CFLAGS manually, we'll have to
pass that flags as well.
Signed-off-by: Marcel Denia <naoir@gmx.net>
Before, external modules actually used host-perl headers.
Aside from obviously being the wrong thing to do, it made them misbehave if
host and target architectures differ too much.
Signed-off-by: Marcel Denia <naoir@gmx.net>
This makes external perl modules compile their native code with the
correct CFLAGS, not with the one host-perl is using.
Signed-off-by: Marcel Denia <naoir@gmx.net>