build: make sure asm gets built with -DPIC
Fixes issue openwrt/packages#14921, whereby inline ASM wasn't getting built as PIC; look at gmp-6.2.1/mpn/x86/pentium/popcount.asm for example: ifdef(`PIC',` ... for a routine that exists in both PIC and non-PIC versions. Make sure that wherever $(FPIC) gets passed as a variable expansion that it gets quoted where necessary (such as setting environment variables in shell commands). Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
		
				
					committed by
					
						
						Kevin Darbyshire-Bryant
					
				
			
			
				
	
			
			
			
						parent
						
							1bf2b3fe90
						
					
				
				
					commit
					af22991e03
				
			
							
								
								
									
										6
									
								
								rules.mk
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								rules.mk
									
									
									
									
									
								
							@@ -75,12 +75,12 @@ IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1)
 | 
				
			|||||||
OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH))
 | 
					OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be powerpc ))
 | 
					ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be powerpc ))
 | 
				
			||||||
  FPIC:=-fPIC
 | 
					  FPIC:=-DPIC -fPIC
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  FPIC:=-fpic
 | 
					  FPIC:=-DPIC -fpic
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HOST_FPIC:=-fPIC
 | 
					HOST_FPIC:=-DPIC -fPIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ARCH_SUFFIX:=$(call qstrip,$(CONFIG_CPU_TYPE))
 | 
					ARCH_SUFFIX:=$(call qstrip,$(CONFIG_CPU_TYPE))
 | 
				
			||||||
GCC_ARCH:=
 | 
					GCC_ARCH:=
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user