#3 Fix build with clang
Closed 3 years ago by tbaeder. Opened 4 years ago by tbaeder.
Unknown source master  into  master

file modified
+15 -5
@@ -1,6 +1,6 @@

  Name:           acpica-tools

  Version:        20200214

- Release:        1%{?dist}

+ Release:        4%{?dist}

  Summary:        ACPICA tools for the development and debug of ACPI tables

  

  License:        GPLv2
@@ -181,17 +181,22 @@

      -Wredundant-decls\

      -Wempty-body\

      -Woverride-init\

-     -Wlogical-op\

-     -Wmissing-parameter-type\

-     -Wold-style-declaration\

      -Wtype-limits"

  

+ # clang doesn't have these

+ if [ "%{__cc}" != "clang" ]; then

+     CWARNINGFLAGS="$CWARNINGFLAGS \

+         -Wlogical-op\

+         -Wmissing-parameter-type\

+         -Wold-style-declaration"

+ fi

+ 

  OPT_CFLAGS="%{optflags} $CWARNINGFLAGS"

  OPT_LDFLAGS="%{__global_ldflags}"

  export OPT_CFLAGS

  export OPT_LDFLAGS

  

- make

+ %{make_build}

  

  

  %install
@@ -247,6 +252,11 @@

  

  

  %changelog

+ * Mon Mar 09 2020 Timm Baeder <tbaeder@redhat.com> - 20200214-4

+ - Don't pass unrecognized command line arguments to clang

+ - Update f23-hardening.patch to pass -pie via OPT_LDFLAGS

+ - Use %%{make_build} instead of just make

+ 

  * Wed Feb 26 2020 Al Stone <ahs3@redhat.com> - 20200214-1

  - Update to 20200214 source tree, including patch refreshes

  - Add patch to fix up issues where strings and 4-byte quantities

file modified
+3 -3
@@ -16,8 +16,8 @@

   OPT_CFLAGS += -D_FORTIFY_SOURCE=2

   endif

   

- +OPT_CFLAGS += -fPIC -pie

- +

+ +OPT_CFLAGS += -fPIC

+ +OPT_LDFLAGS += -pie

   CFLAGS += \

       -D$(ACPI_HOST)\

       -D_GNU_SOURCE\
@@ -29,7 +29,7 @@

   # Cannot use the common compile warning flags since the C files are created

   # by the utilities above and they are not necessarily ANSI C, etc.

   #

- +HARDENING_FLAGS = -fPIC -pie

+ +HARDENING_FLAGS = -fPIC

   $(OBJDIR)/aslcompilerlex.o :   $(OBJDIR)/aslcompilerlex.c

   	@echo "- " "Intermediate" $<

  -	@$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<

Don't pass command line arguments to clang that it does not support, and split up cflags and ldflags. Includes minor %{make_build} change.

Pull-Request has been closed by tbaeder

3 years ago