Forráskód Böngészése

buildsys: Fix broken link.asneeded function

Both $(CC_FLAG_ASNEEDED) and $(CC_FLAG_NO_ASNEEDED) never become "y",
must check for non-empty strings.
To keep make 3.80 compatibility "$(if" used only.

Fixes: 7da4d1e7 "buildsys: do not use $(and)".

Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Leonid Lisovskiy 8 éve
szülő
commit
e517397535
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Rules.mak

+ 1 - 1
Rules.mak

@@ -535,7 +535,7 @@ ifdef LD_FLAG_NO_ASNEEDED
 export CC_FLAG_NO_ASNEEDED:=-Wl,$(LD_FLAG_NO_ASNEEDED)
 endif
 endif
-link.asneeded = $(if $(findstring yy,$(CC_FLAG_ASNEEDED)$(CC_FLAG_NO_ASNEEDED)),$(CC_FLAG_ASNEEDED) $(1) $(CC_FLAG_NO_ASNEEDED))
+link.asneeded = $(if $(CC_FLAG_ASNEEDED),$(if $(CC_FLAG_NO_ASNEEDED),$(CC_FLAG_ASNEEDED) $(1) $(CC_FLAG_NO_ASNEEDED)))
 
 # Check for AS_NEEDED support in linker script (binutils>=2.16.1 has it)
 ifndef ASNEEDED