Author: gonzo
Date: Tue Jan 10 20:15:24 2017
New Revision: 311891
URL: https://svnweb.freebsd.org/changeset/base/311891

Log:
  [efi] Build EFI bits with -fPIC on ARM
  
  clang 3.9.0 without -fPIC generates absolute jump table for
  switch/case statement which trips boot1.efi and loader.efi
  on ARM platform.
  
  Reviewed by:  andrew
  MFC after:    3 days
  Differential Revision:        https://reviews.freebsd.org/D9108

Modified:
  head/sys/boot/efi/Makefile.inc

Modified: head/sys/boot/efi/Makefile.inc
==============================================================================
--- head/sys/boot/efi/Makefile.inc      Tue Jan 10 20:12:07 2017        
(r311890)
+++ head/sys/boot/efi/Makefile.inc      Tue Jan 10 20:15:24 2017        
(r311891)
@@ -23,4 +23,8 @@ CFLAGS+=      -fshort-wchar
 CFLAGS+=       -fPIC
 .endif
 
+.if ${MACHINE_CPUARCH} == "arm"
+CFLAGS+=       -fPIC
+.endif
+
 .include "../Makefile.inc"
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to