Revert "Add removing of the -Wl,-Bsymbolic options in gcc-force-options script"
authorMaria Guseva <m.guseva@samsung.com>
Wed, 5 Jul 2017 08:45:03 +0000 (11:45 +0300)
committerMaria Guseva <m.guseva@samsung.com>
Tue, 11 Jul 2017 02:46:03 +0000 (11:46 +0900)
This reverts commit 76f20263d005bcb2db00dedbb4e1429a95e6a486.
Reverted as the libsancov_cb hack was removed in previous commit.

packaging/gcc-force-options

index b68c3d2ec14e8aee817929f1caea8ad8fc2cc6bd..34f49455f2b8a0ddd79b389ef39e42a02a642377 100755 (executable)
@@ -47,16 +47,10 @@ if echo "$PREFLAGS "\$@" $POSTFLAGS" | grep -q -- "-fsanitize=undefined" && echo
        # Don't instrument kernel modules
        # Don't instrument with "-nostdlib" linking
 elif ! echo "\$@" | grep -q -e __KERNEL__ -e \-nostdlib; then
-       ARGS="\$@"
-       if echo "$PREFLAGS \$ARGS $POSTFLAGS" | grep -q -- 'libsancov_cb.a\\|-lsancov_cb'; then
-               # Remove -Bsymbolic flags to use weak symbols in libsancov_cb.a
-               echo "Warning: -Bsymbolic linkage flags will be removed, see gcc-force-options for details" >&2
-               ARGS=\$(echo "\$@" | sed 's/-Wl,-Bsymbolic\\(-functions\\)\\?\\b//g')
-       fi
        # Use readlink in order to follow symlinks if any
-       \$(readlink -f \$0)-real $PREFLAGS \$ARGS $POSTFLAGS
+       \$(readlink -f \$0)-real $PREFLAGS "\$@" $POSTFLAGS
 else
-       \$(readlink -f \$0)-real \$ARGS
+       \$(readlink -f \$0)-real "\$@"
 fi
 EOF
 chmod +x $TMP