xen: fix gcc6 build
This commit is contained in:
parent
adc0bd0194
commit
35ad8b68d8
7 changed files with 129 additions and 0 deletions
13
srcpkgs/xen/files/gcc6_fix_1.patch
Normal file
13
srcpkgs/xen/files/gcc6_fix_1.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- ipxe/src/core/stringextra.c 2011-12-11 03:28:04.000000000 +0100
|
||||
+++ ipxe/src/core/stringextra.c 2016-10-13 11:29:05.025171208 +0200
|
||||
@@ -186,7 +186,9 @@
|
||||
{
|
||||
char *sbegin, *send;
|
||||
|
||||
- sbegin = s ? s : ___strtok;
|
||||
+ sbegin = s;
|
||||
+ if (!sbegin)
|
||||
+ sbegin = ___strtok;
|
||||
if (!sbegin) {
|
||||
return NULL;
|
||||
}
|
10
srcpkgs/xen/files/gcc6_fix_2.patch
Normal file
10
srcpkgs/xen/files/gcc6_fix_2.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- ipxe/src/include/nic.h 2016-10-13 11:36:49.397750709 +0200
|
||||
+++ ipxe/src/include/nic.h 2016-10-13 11:37:55.082691367 +0200
|
||||
@@ -199,7 +199,6 @@
|
||||
|
||||
#undef DRIVER
|
||||
#define DRIVER(_name_text,_unused2,_unused3,_name,_probe,_disable) \
|
||||
- static const char _name ## _text[] = _name_text; \
|
||||
static inline int \
|
||||
_name ## _probe ( struct nic *nic, void *hwdev ) { \
|
||||
return _probe ( nic, hwdev ); \
|
11
srcpkgs/xen/files/gcc6_fix_3.patch
Normal file
11
srcpkgs/xen/files/gcc6_fix_3.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- ipxe/src/Makefile 2011-12-11 03:28:04.000000000 +0100
|
||||
+++ ipxe/src/Makefile 2016-10-13 11:41:16.210509858 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
CLEANUP :=
|
||||
-CFLAGS :=
|
||||
+CFLAGS = -Wno-error=unused-const-variable= -Wno-error=misleading-indentation -Wno-error=shift-negative-value -Wno-error=nonnull-compare
|
||||
ASFLAGS :=
|
||||
LDFLAGS :=
|
||||
MAKEDEPS := Makefile
|
23
srcpkgs/xen/files/gcc6_fix_4.patch
Normal file
23
srcpkgs/xen/files/gcc6_fix_4.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- ipxe/src/drivers/net/via-rhine.c 2011-12-11 03:28:04.000000000 +0100
|
||||
+++ ipxe/src/drivers/net/via-rhine.c 2016-10-13 12:31:46.766898745 +0200
|
||||
@@ -947,14 +947,14 @@
|
||||
// if (tp->chip_id == 0x3065)
|
||||
if( tp->chip_revision < 0x80 && tp->chip_revision >=0x40 )
|
||||
intr_status |= inb(nic->ioaddr + IntrStatus2) << 16;
|
||||
- intr_status = (intr_status & ~DEFAULT_INTR);
|
||||
- if ( action == ENABLE )
|
||||
- intr_status = intr_status | DEFAULT_INTR;
|
||||
- outw(intr_status, nic->ioaddr + IntrEnable);
|
||||
- break;
|
||||
+ intr_status = (intr_status & ~DEFAULT_INTR);
|
||||
+ if ( action == ENABLE )
|
||||
+ intr_status = intr_status | DEFAULT_INTR;
|
||||
+ outw(intr_status, nic->ioaddr + IntrEnable);
|
||||
+ break;
|
||||
case FORCE :
|
||||
outw(0x0010, nic->ioaddr + 0x84);
|
||||
- break;
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
31
srcpkgs/xen/files/gcc6_fix_5.patch
Normal file
31
srcpkgs/xen/files/gcc6_fix_5.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- ipxe/src/drivers/net/e1000/e1000_phy.c 2011-12-11 03:28:04.000000000 +0100
|
||||
+++ ipxe/src/drivers/net/e1000/e1000_phy.c 2016-10-13 12:33:50.081735254 +0200
|
||||
@@ -167,18 +167,18 @@
|
||||
if (!(phy->ops.read_reg))
|
||||
goto out;
|
||||
|
||||
- ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
|
||||
- if (ret_val)
|
||||
- goto out;
|
||||
+ ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
|
||||
+ if (ret_val)
|
||||
+ goto out;
|
||||
|
||||
- phy->id = (u32)(phy_id << 16);
|
||||
- usec_delay(20);
|
||||
- ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
|
||||
- if (ret_val)
|
||||
- goto out;
|
||||
+ phy->id = (u32)(phy_id << 16);
|
||||
+ usec_delay(20);
|
||||
+ ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
|
||||
+ if (ret_val)
|
||||
+ goto out;
|
||||
|
||||
- phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
|
||||
- phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
|
||||
+ phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
|
||||
+ phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
|
||||
|
||||
out:
|
||||
return ret_val;
|
30
srcpkgs/xen/files/gcc6_fix_6.patch
Normal file
30
srcpkgs/xen/files/gcc6_fix_6.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
--- ipxe/src/drivers/net/ath/ath9k/ath9k_eeprom.c 2011-12-11 03:28:04.000000000 +0100
|
||||
+++ ipxe/src/drivers/net/ath/ath9k/ath9k_eeprom.c 2016-10-13 12:53:49.000372288 +0200
|
||||
@@ -371,7 +371,7 @@
|
||||
/* FIXME: array overrun? */
|
||||
for (i = 0; i < numXpdGains; i++) {
|
||||
minPwrT4[i] = data_9287[idxL].pwrPdg[i][0];
|
||||
- maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4];
|
||||
+ maxPwrT4[i] = data_9287[idxL].pwrPdg[i][0];
|
||||
ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
|
||||
data_9287[idxL].pwrPdg[i],
|
||||
data_9287[idxL].vpdPdg[i],
|
||||
@@ -381,7 +381,7 @@
|
||||
} else if (eeprom_4k) {
|
||||
for (i = 0; i < numXpdGains; i++) {
|
||||
minPwrT4[i] = data_4k[idxL].pwrPdg[i][0];
|
||||
- maxPwrT4[i] = data_4k[idxL].pwrPdg[i][4];
|
||||
+ maxPwrT4[i] = data_4k[idxL].pwrPdg[i][0];
|
||||
ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
|
||||
data_4k[idxL].pwrPdg[i],
|
||||
data_4k[idxL].vpdPdg[i],
|
||||
@@ -391,7 +391,7 @@
|
||||
} else {
|
||||
for (i = 0; i < numXpdGains; i++) {
|
||||
minPwrT4[i] = data_def[idxL].pwrPdg[i][0];
|
||||
- maxPwrT4[i] = data_def[idxL].pwrPdg[i][4];
|
||||
+ maxPwrT4[i] = data_def[idxL].pwrPdg[i][0];
|
||||
ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
|
||||
data_def[idxL].pwrPdg[i],
|
||||
data_def[idxL].vpdPdg[i],
|
||||
|
|
@ -44,6 +44,17 @@ nostrip_files="
|
|||
s390-ccw.img"
|
||||
pycompile_module="xen grub"
|
||||
|
||||
pre_configure() {
|
||||
local i _gccver=$(gcc --version | awk '/^gcc \(GCC\)/ { print $3 }')
|
||||
[ "${_gccver%%.*}" -lt 6 ] && return 0
|
||||
|
||||
sed -i tools/configure -e's; -Werror;-Wno-error;g'
|
||||
# Copy patches for _ipxe.tar.gz contents
|
||||
for i in $(seq 1 6); do
|
||||
cp ${FILESDIR}/gcc6_fix_${i}.patch tools/firmware/etherboot/patches
|
||||
echo "gcc6_fix_${i}.patch" >> tools/firmware/etherboot/patches/series
|
||||
done
|
||||
}
|
||||
do_configure() {
|
||||
rm -f ${XBPS_WRAPPERDIR}/strip
|
||||
cp ${FILESDIR}/*.h ${wrksrc}/tools/firmware
|
||||
|
|
Loading…
Reference in a new issue