Merge pull request #2718 from InuSasha/updates/gcc-8.1

gcc: update to 8.1
This commit is contained in:
CvH 2018-06-04 21:05:08 +02:00 committed by GitHub
commit 01391bb7db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 155 additions and 10 deletions

View File

@ -23,6 +23,6 @@
TARGET_KERNEL_ARCH=arm64
# setup ARCH specific *FLAGS
TARGET_CFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mabi=lp64 -Wno-psabi $TARGET_EXTRA_FLAGS"
TARGET_CFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mabi=lp64 -Wno-psabi -mtune=$TARGET_CPU $TARGET_EXTRA_FLAGS"
TARGET_LDFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mtune=$TARGET_CPU"
GCC_OPTS="--with-abi=lp64 --with-arch=$TARGET_VARIANT"

View File

@ -58,7 +58,7 @@
TARGET_KERNEL_ARCH=${TARGET_KERNEL_ARCH:-arm}
# setup ARCH specific *FLAGS
TARGET_CFLAGS="-march=$TARGET_VARIANT -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated $TARGET_EXTRA_FLAGS"
TARGET_CFLAGS="-march=$TARGET_VARIANT -mtune=$TARGET_CPU -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated $TARGET_EXTRA_FLAGS"
[ -n "$TARGET_FPU" ] && TARGET_CFLAGS="$TARGET_CFLAGS $TARGET_FPU_FLAGS"
TARGET_LDFLAGS="-march=$TARGET_VARIANT -mtune=$TARGET_CPU"
GCC_OPTS="--with-abi=aapcs-linux --with-arch=$TARGET_SUBARCH --with-float=$TARGET_FLOAT --with-fpu=$TARGET_FPU"

View File

@ -38,10 +38,14 @@ LIB_PREFIX=$SYSROOT_PREFIX/usr
TARGET_PREFIX=$TOOLCHAIN/bin/$TARGET_NAME-
# use linaro toolchain on 64/32 split builds
if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
TARGET_KERNEL_PREFIX=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu-
if [ -z "$TARGET_KERNEL_RELATIVE_PREFIX" ]; then
if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
TARGET_KERNEL_PREFIX=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu-
else
TARGET_KERNEL_PREFIX=$TARGET_PREFIX
fi
else
TARGET_KERNEL_PREFIX=$TARGET_PREFIX
TARGET_KERNEL_PREFIX="$TOOLCHAIN/$TARGET_KERNEL_RELATIVE_PREFIX"
fi
FAKEROOT_SCRIPT=$BUILD/.fakeroot

View File

@ -30,6 +30,7 @@ PKG_SECTION="service/system"
PKG_SHORTDESC="tinc: a Virtual Private Network daemon"
PKG_LONGDESC="tinc ($PKG_VERSION) is a Virtual Private Network (VPN) daemon that uses tunnelling and encryption to create a secure private network between hosts on the Internet. Because the VPN appears to the IP level network code as a normal network device, there is no need to adapt any existing software. This allows VPN sites to share information with each other over the Internet without exposing any information to others."
PKG_TOOLCHAIN="autotools"
PKG_BUILD_FLAGS="+pic"
PKG_IS_ADDON="yes"
PKG_ADDON_NAME="tinc"

View File

@ -28,6 +28,7 @@ PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="compress"
PKG_SHORTDESC="LZO data compressor"
PKG_LONGDESC="LZO is a data compression library which is suitable for data de-/compression in real-time. This means it favours speed over compression ratio."
PKG_BUILD_FLAGS="+pic"
PKG_CMAKE_OPTS_HOST="-DENABLE_SHARED=OFF -DENABLE_STATIC=ON"
PKG_CMAKE_OPTS_TARGET="-DENABLE_SHARED=OFF -DENABLE_STATIC=ON"

View File

@ -89,6 +89,7 @@ pre_configure_target() {
# set some CFLAGS we need
export CFLAGS="$CFLAGS -g -fno-stack-protector"
export CFLAGS="$CFLAGS -Wno-error=stringop-truncation -Wno-error=overflow -Wno-error=format-overflow="
export BUILD_CC=$HOST_CC
export OBJDUMP_FOR_HOST=objdump

View File

@ -0,0 +1,54 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2017-present Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="gcc-linaro-arm-linux-gnuebihf"
PKG_VERSION="7.2.1-2017.11"
PKG_SHA256="72919a3a99d4e28309bc8b0e615f44c65824ef012de50db3ffe9a34776e6f510"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE=""
PKG_URL="https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabihf/gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf.tar.xz"
PKG_SOURCE_DIR="gcc-linaro-$PKG_VERSION-i686_arm-linux-gnueabihf"
PKG_DEPENDS_HOST="ccache:host"
PKG_SECTION="lang"
PKG_LONGDESC="Linaro ARMv8 GNU Linux Binary Toolchain"
PKG_TOOLCHAIN="manual"
makeinstall_host() {
mkdir -p $TOOLCHAIN/lib/gcc-linaro-arm-linux-gnuebihf/
cp -a * $TOOLCHAIN/lib/gcc-linaro-arm-linux-gnuebihf
# wrap gcc and g++ with ccache like in gcc package.mk
PKG_GCC_PREFIX="$TOOLCHAIN/lib/gcc-linaro-arm-linux-gnuebihf/bin/arm-linux-gnueabihf-"
cp "${PKG_GCC_PREFIX}gcc" "${PKG_GCC_PREFIX}gcc.real"
cat > "${PKG_GCC_PREFIX}gcc" << EOF
#!/bin/sh
$TOOLCHAIN/bin/ccache ${PKG_GCC_PREFIX}gcc.real "\$@"
EOF
chmod +x "${PKG_GCC_PREFIX}gcc"
cp "${PKG_GCC_PREFIX}g++" "${PKG_GCC_PREFIX}g++.real"
cat > "${PKG_GCC_PREFIX}g++" << EOF
#!/bin/sh
$TOOLCHAIN/bin/ccache ${PKG_GCC_PREFIX}g++.real "\$@"
EOF
chmod +x "${PKG_GCC_PREFIX}g++"
}

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="gcc"
PKG_VERSION="7.3.0"
PKG_SHA256="832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c"
PKG_VERSION="8.1.0"
PKG_SHA256="1d1866f992626e61349a1ccd0b8d5253816222cdc13390dcfaa74b093aa2b153"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://gcc.gnu.org/"
@ -27,7 +27,7 @@ PKG_DEPENDS_BOOTSTRAP="ccache:host autoconf:host binutils:host gmp:host mpfr:hos
PKG_DEPENDS_TARGET="gcc:host"
PKG_DEPENDS_HOST="ccache:host autoconf:host binutils:host gmp:host mpfr:host mpc:host glibc"
PKG_SECTION="lang"
PKG_SHORTDESC="gcc: The GNU Compiler Collection Version 4 (aka GNU C Compiler)"
PKG_SHORTDESC="gcc: The GNU Compiler Collection (aka GNU C Compiler)"
PKG_LONGDESC="This package contains the GNU Compiler Collection. It includes compilers for the languages C, C++, Objective C, Fortran 95, Java and others ... This GCC contains the Stack-Smashing Protector Patch which can be enabled with the -fstack-protector command-line option. More information about it ca be found at http://www.research.ibm.com/trl/projects/security/ssp/."
GCC_COMMON_CONFIGURE_OPTS="--target=$TARGET_NAME \

View File

@ -76,6 +76,11 @@ if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
HEADERS_ARCH=$TARGET_ARCH
fi
if [ "$LINUX" = "amlogic-3.10" -a "$TARGET_KERNEL_ARCH" = "arm" -a "$TARGET_ARCH" = "arm" ]; then
PKG_DEPENDS_HOST="$PKG_DEPENDS_HOST gcc-linaro-arm-linux-gnuebihf:host"
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET gcc-linaro-arm-linux-gnuebihf:host"
fi
if [ "$PKG_BUILD_PERF" != "no" ] && grep -q ^CONFIG_PERF_EVENTS= $PKG_KERNEL_CFG_FILE ; then
PKG_BUILD_PERF="yes"
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET binutils elfutils libunwind zlib openssl"

View File

@ -80,7 +80,8 @@ make_target() {
NSS_TESTS="dummy" \
NSINSTALL=$TOOLCHAIN/bin/nsinstall \
CPU_ARCH_TAG=$TARGET_ARCH \
CC=$CC LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib" \
CC=$CC XCFLAGS="-Wno-error=stringop-truncation -Wno-error=format-overflow" \
LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib" \
V=1
}

View File

@ -105,7 +105,7 @@ PKG_MESON_OPTS_TARGET="--libdir=/usr/lib \
-Dumount-path=/usr/bin/umount"
pre_configure_target() {
export CFLAGS="$CFLAGS -fno-schedule-insns -fno-schedule-insns2"
export CFLAGS="$CFLAGS -fno-schedule-insns -fno-schedule-insns2 -Wno-format-truncation"
export LC_ALL=en_US.UTF-8
}

View File

@ -0,0 +1,72 @@
From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Mon, 26 Mar 2018 16:52:34 +0800
Subject: Fix packed-not-aligned error on GCC 8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When building with GCC 8, there are several errors regarding packed-not-aligned.
./include/grub/gpt_partition.h:79:1: error: alignment 1 of struct grub_gpt_partentry is less than 8 [-Werror=packed-not-aligned]
This patch fixes the build error by cleaning up the ambiguity of placing
aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
has to be packed, to ensure the structure is bit-to-bit mapped to the format
laid on disk. I think we could blame to copy and paste error here for the
mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
the name suggests. :)
Signed-off-by: Michael Chang <mchang@suse.com>
Tested-by: Michael Chang <mchang@suse.com>
Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/fs/btrfs.c | 2 +-
include/grub/efiemu/runtime.h | 2 +-
include/grub/gpt_partition.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index 4849c1c..be19544 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -175,7 +175,7 @@ struct grub_btrfs_time
{
grub_int64_t sec;
grub_uint32_t nanosec;
-} __attribute__ ((aligned (4)));
+} GRUB_PACKED;
struct grub_btrfs_inode
{
diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
index 9b6b729..36d2ded 100644
--- a/include/grub/efiemu/runtime.h
+++ b/include/grub/efiemu/runtime.h
@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
struct efi_variable
{
- grub_efi_guid_t guid;
+ grub_efi_packed_guid_t guid;
grub_uint32_t namelen;
grub_uint32_t size;
grub_efi_uint32_t attributes;
diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
index 1b32f67..9668a68 100644
--- a/include/grub/gpt_partition.h
+++ b/include/grub/gpt_partition.h
@@ -28,7 +28,7 @@ struct grub_gpt_part_type
grub_uint16_t data2;
grub_uint16_t data3;
grub_uint8_t data4[8];
-} __attribute__ ((aligned(8)));
+} GRUB_PACKED;
typedef struct grub_gpt_part_type grub_gpt_part_type_t;
#define GRUB_GPT_PARTITION_TYPE_EMPTY \
--
cgit v1.0-41-gc330

View File

@ -33,6 +33,9 @@
# neon-vfpv4.
TARGET_FPU="neon-fp16"
TARGET_FEATURES="32bit"
# TARGET_KERNEL_PREFIX
TARGET_KERNEL_RELATIVE_PREFIX="lib/gcc-linaro-arm-linux-gnuebihf/bin/arm-linux-gnueabihf-"
;;
esac

View File

@ -33,6 +33,9 @@
# neon-vfpv4.
TARGET_FPU="neon-fp16"
TARGET_FEATURES="32bit"
# TARGET_KERNEL_PREFIX
TARGET_KERNEL_RELATIVE_PREFIX="lib/gcc-linaro-arm-linux-gnuebihf/bin/arm-linux-gnueabihf-"
;;
esac