Skip to content

Commit c8e9904

Browse files
committed
Fix link error when libpng/libjpeg isn't installed.
If libPNG and/or JPEG libraries are not installed and Perl was compiled with -D_FORTIFY_SOURCE, the linker will fail with a mismatched errno error. This is caused by GCC outputting a warning when Perl/Tk's build system picks up on the _FORTIFY_SOURCE option but not the optimization option. The configure script checks the compiler output against the empty string, so the warning causes it to assume there is no errno.h on the system. Fixes eserte#109.
1 parent f0bb386 commit c8e9904

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

JPEG/Makefile.jpeg.maybe

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if ($^O eq 'MSWin32')
3232
else
3333
{
3434
$ENV{CC} = $Config{cc};
35-
local $ENV{CFLAGS} = "$Config{ccflags} $Config{cccdlflags}";
35+
local $ENV{CFLAGS} = "$Config{ccflags} $Config{optimize} $Config{cccdlflags}";
3636
local $ENV{LDFLAGS} = "$Config{ccflags} $Config{ldflags}";
3737
system(sh => "./configure");
3838
}

PNG/Makefile.zlib.maybe

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if ($^O eq 'MSWin32')
2626
else
2727
{
2828
$ENV{CC} = $Config{cc};
29-
local $ENV{CFLAGS} = "$Config{ccflags} $Config{cccdlflags}";
29+
local $ENV{CFLAGS} = "$Config{ccflags} $Config{optimize} $Config{cccdlflags}";
3030
system(sh => "./configure");
3131
}
3232

0 commit comments

Comments
 (0)