Subject: | [PATCH] build problems |
These patches are not 100% all right but it solved our (Fedora) problem
with RPM_OPT_FLAGS which weren't applied.
The first problem was missed OPTIMIZE in Makefile.PL
(perl-PAR-Packer-cflags.patch). The second problem was missing third
parametr in open.
Also this module can't be build parallel because this build is not
parallel safe. We need to use PAR_GLOBAL_TEMP for it.
Subject: | perl-PAR-Packer-open.patch |
--- PAR-Packer-0.991/myldr/static.c.orig 2009-09-21 17:29:38.000000000 +0200
+++ PAR-Packer-0.991/myldr/static.c 2009-09-21 17:28:42.000000000 +0200
@@ -31,7 +31,7 @@
if ( (unsigned long)PL_statbuf.st_size == size ) return -2;
}
- i = open(my_file, O_CREAT | O_WRONLY | OPEN_O_BINARY);
+ i = open(my_file, O_CREAT | O_WRONLY | OPEN_O_BINARY, 0777);
if (i == -1) {
fprintf(stderr, "%s: creation of %s failed - aborting with %i.\n", argv0, my_file, errno);
Subject: | perl-PAR-Packer-cflags.patch |
--- PAR-Packer-0.991/myldr/Makefile.PL.cflags 2009-03-21 11:58:51.000000000 +0100
+++ PAR-Packer-0.991/myldr/Makefile.PL 2009-09-21 17:14:11.000000000 +0200
@@ -123,6 +123,7 @@
my $cflags = "$ccdebug$warn$pccflags";
+my $optimize = $Config{optimize};
my $ldflags = "$lddebug$pldflags";
my $static_ldflags = $ldflags;
@@ -206,6 +207,7 @@
LD=$ld
CC=$cc
CFLAGS=$cflags
+OPTIMIZE=$optimize
LDFLAGS=$Config{ldflags}
PERL_LDFLAGS=$ldflags
STATIC_LDFLAGS=$static_ldflags
@@ -214,7 +216,7 @@
OBJECTS=main$o my_par_pl$o $res
.c$o:
- \$(CC) -c \$(CFLAGS) \$<
+ \$(CC) -c \$(CFLAGS) \$(OPTIMIZE) \$<
all: $all