From: Jason Self Date: Sat, 17 Feb 2018 02:32:24 +0000 (-0800) Subject: carl9170: Update based on commit cd76b7b483731dc5cb467c28cc70478179fbffd5 dated Feb... X-Git-Tag: v1.1~2 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=9f049536fdf404b3f1941a22be6870d92a3957e3;p=linux-libre-firmware.git carl9170: Update based on commit cd76b7b483731dc5cb467c28cc70478179fbffd5 dated Feb 9 2018 --- diff --git a/carl9170fw/carlfw/CMakeLists.txt b/carl9170fw/carlfw/CMakeLists.txt index 02c80bf..8647a75 100644 --- a/carl9170fw/carlfw/CMakeLists.txt +++ b/carl9170fw/carlfw/CMakeLists.txt @@ -7,7 +7,7 @@ include("../config.cmake") set(CARL9170_FW_ELF carl9170.elf) set(CARLFW_CFLAGS_WARNING "-W -Wall -Wextra -Wunreachable-code -Winline -Wlogical-op -Wno-packed-bitfield-compat -Winit-self -Wshadow -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wformat=2 -Wcast-align -Wmissing-format-attribute -Wmissing-prototypes -Wtype-limits -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Wdisabled-optimization -Wpointer-arith -Wvolatile-register-var -Waddress -Wbad-function-cast -Wunsafe-loop-optimizations") -set(CARLFW_CFLAGS_EXTRA "-mbitops -std=gnu99 -ffunction-sections -Wframe-larger-than=128 -Werror") +set(CARLFW_CFLAGS_EXTRA "-mbitops -ffunction-sections -Wframe-larger-than=128 -Werror") set(CARLFW_CFLAGS_DEF "-D__CARL9170FW__") if (CONFIG_CARL9170FW_AGGRESSIVE_CFLAGS) set(CARLFW_CFLAGS_AGGRESSIVE "-fomit-frame-pointer -fsee -frename-registers -ftree-vectorize -flto -fstrict-volatile-bitfields -fmodulo-sched -fwhole-program") diff --git a/carl9170fw/config/expr.c b/carl9170fw/config/expr.c index cbf4996..8cee597 100644 --- a/carl9170fw/config/expr.c +++ b/carl9170fw/config/expr.c @@ -893,7 +893,10 @@ static enum string_value_kind expr_parse_string(const char *str, switch (type) { case S_BOOLEAN: case S_TRISTATE: - return k_string; + val->s = !strcmp(str, "n") ? 0 : + !strcmp(str, "m") ? 1 : + !strcmp(str, "y") ? 2 : -1; + return k_signed; case S_INT: val->s = strtoll(str, &tail, 10); kind = k_signed; diff --git a/carl9170fw/config/list.h b/carl9170fw/config/list.h index 2cf23f0..45cb237 100644 --- a/carl9170fw/config/list.h +++ b/carl9170fw/config/list.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef LIST_H #define LIST_H diff --git a/carl9170fw/config/lkc_proto.h b/carl9170fw/config/lkc_proto.h index d539871..5d86e2d 100644 --- a/carl9170fw/config/lkc_proto.h +++ b/carl9170fw/config/lkc_proto.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #include /* confdata.c */ diff --git a/carl9170fw/config/symbol.c b/carl9170fw/config/symbol.c index 20136ff..3c8bd9b 100644 --- a/carl9170fw/config/symbol.c +++ b/carl9170fw/config/symbol.c @@ -1061,7 +1061,7 @@ struct symbol **sym_re_search(const char *pattern) } if (sym_match_arr) { qsort(sym_match_arr, cnt, sizeof(struct sym_match), sym_rel_comp); - sym_arr = malloc((cnt+1) * sizeof(struct symbol)); + sym_arr = malloc((cnt+1) * sizeof(struct symbol *)); if (!sym_arr) goto sym_re_search_free; for (i = 0; i < cnt; i++) diff --git a/carl9170fw/extra/GCCVersion.cmake b/carl9170fw/extra/GCCVersion.cmake deleted file mode 100644 index bb5fef3..0000000 --- a/carl9170fw/extra/GCCVersion.cmake +++ /dev/null @@ -1,60 +0,0 @@ -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# Copyright 2006-2008 Andreas Schneider -# Copyright 2007 Wengo -# Copyright 2007 Mike Jackson -# Copyright 2008 Andreas Pakulat -# Copyright 2008-2009 Philip Lowman -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the names of Kitware, Inc., the Insight Software Consortium, -# nor the names of their contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#------------------------------------------------------------------------------- - -# -# Runs compiler with "-dumpversion" and parses major/minor -# version with a regex. -# -FUNCTION(_COMPILER_DUMPVERSION _OUTPUT_VERSION) - - EXEC_PROGRAM(${CMAKE_C_COMPILER} - ARGS ${CMAKE_C_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE _COMPILER_VERSION - ) - STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" - _COMPILER_VERSION ${_COMPILER_VERSION}) - - SET(${_OUTPUT_VERSION} ${_COMPILER_VERSION} PARENT_SCOPE) -ENDFUNCTION() - -# -# End functions/macros -# -#------------------------------------------------------------------------------- - - diff --git a/carl9170fw/toolchain/Makefile b/carl9170fw/toolchain/Makefile index 0b10de3..3ee93a9 100644 --- a/carl9170fw/toolchain/Makefile +++ b/carl9170fw/toolchain/Makefile @@ -1,16 +1,16 @@ -BINUTILS_VER=2.29 +BINUTILS_VER=2.30 BINUTILS_TAR=binutils-$(BINUTILS_VER).tar.xz BINUTILS_URL="http://ftpmirror.gnu.org/gnu/binutils/$(BINUTILS_TAR)" -NEWLIB_VER=2.5.0 +NEWLIB_VER=3.0.0 NEWLIB_TAR=newlib-$(NEWLIB_VER).tar.gz NEWLIB_URL="ftp://sourceware.org/pub/newlib/$(NEWLIB_TAR)" -GCC_VER=7.2.0 +GCC_VER=7.3.0 GCC_TAR=gcc-$(GCC_VER).tar.xz GCC_URL="http://ftpmirror.gnu.org/gnu/gcc/gcc-$(GCC_VER)/$(GCC_TAR)" -MPFR_VER=3.1.6 +MPFR_VER=4.0.1 MPFR_TAR=mpfr-$(MPFR_VER).tar.xz MPFR_URL="http://ftpmirror.gnu.org/gnu/mpfr/$(MPFR_TAR)" @@ -18,7 +18,7 @@ GMP_VER=6.1.2 GMP_TAR=gmp-$(GMP_VER).tar.xz GMP_URL="http://ftpmirror.gnu.org/gnu/gmp/$(GMP_TAR)" -MPC_VER=1.0.3 +MPC_VER=1.1.0 MPC_TAR=mpc-$(MPC_VER).tar.gz MPC_URL="http://ftpmirror.gnu.org/gnu/mpc/$(MPC_TAR)" diff --git a/carl9170fw/toolchain/SHA256SUMS b/carl9170fw/toolchain/SHA256SUMS index 788588d..99505e4 100644 --- a/carl9170fw/toolchain/SHA256SUMS +++ b/carl9170fw/toolchain/SHA256SUMS @@ -4,4 +4,11 @@ 87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912 src/gmp-6.1.2.tar.xz 617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3 src/mpc-1.0.3.tar.gz 7a62ac1a04408614fccdc506e4844b10cf0ad2c2b1677097f8f35d3a1344a950 src/mpfr-3.1.6.tar.xz +6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e src/mpc-1.1.0.tar.gz +fbe2cd1418b321f5c899ce4f0f0f4e73f5ecc7d02145b0e1fd096f5c3afb8a1d src/mpfr-4.0.0.tar.xz +c8566335ee74e5fcaeb8595b4ebd0400c4b043d6acb3263ecb1314f8f5501332 src/newlib-3.0.0.tar.gz +832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c src/gcc-7.3.0.tar.xz +e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577 src/binutils-2.29.1.tar.xz +67874a60826303ee2fb6affc6dc0ddd3e749e9bfcb4c8655e3953d0458a6e16e src/mpfr-4.0.1.tar.xz +6e46b8aeae2f727a36f0bd9505e405768a72218f1796f0d09757d45209871ae6 src/binutils-2.30.tar.xz diff --git a/carl9170fw/tools/CMakeLists.txt b/carl9170fw/tools/CMakeLists.txt index 1c21fef..13262d6 100644 --- a/carl9170fw/tools/CMakeLists.txt +++ b/carl9170fw/tools/CMakeLists.txt @@ -8,13 +8,8 @@ endif (CONFIG_CARL9170FW_MAKE_RELEASE) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/extra) -include(GCCVersion) include("../config.cmake") -if (("${CMAKE_C_COMPILER_VERSION}" VERSION_GREATER 4.4) OR - ("${CMAKE_C_COMPILER_VERSION}" VERSION_EQUAL 4.4)) - - include_directories (../include/linux ../include/shared ../include lib include) - add_subdirectory(lib) - add_subdirectory(src) -endif () +include_directories (../include/linux ../include/shared ../include lib include) +add_subdirectory(lib) +add_subdirectory(src) diff --git a/carl9170fw/tools/src/CMakeLists.txt b/carl9170fw/tools/src/CMakeLists.txt index d141521..637a788 100644 --- a/carl9170fw/tools/src/CMakeLists.txt +++ b/carl9170fw/tools/src/CMakeLists.txt @@ -8,6 +8,6 @@ set(tools fwinfo miniboot checksum) foreach(tool ${tools}) add_executable( ${tool} ${tool}.c ) - add_definitions("-std=gnu99 -Wall -Wextra -Wshadow") + add_definitions("-Wall -Wextra -Wshadow") target_link_libraries( ${tool} carlfw ) endforeach()