kirkwood: refresh kernel config
[openwrt/openwrt.git] / scripts / patch-specs.sh
index 3307b6b0904501a83a5f8bc8824d91c9304c6fd1..2262e218fe2cb46534aa5bc3c684eb80902aa24d 100755 (executable)
@@ -35,7 +35,7 @@ patch_specs() {
                                echo -n "Patching specs ... "
                                STAGING_DIR="$DIR" "$CPP" -dumpspecs | awk '
                                        mode ~ "link" {
-                                               sub("%{L.}", "%{L*} -L %:getenv(STAGING_DIR /usr/lib) -rpath-link %:getenv(STAGING_DIR /usr/lib)")
+                                               sub(/(%@?\{L.\})/, "& -L %:getenv(STAGING_DIR /usr/lib) -rpath-link %:getenv(STAGING_DIR /usr/lib)")
                                        }
                                        mode ~ "cpp" {
                                                $0 = $0 " -idirafter %:getenv(STAGING_DIR /usr/include)"