aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/picflag.m43
-rwxr-xr-xlibiberty/configure3
2 files changed, 6 insertions, 0 deletions
diff --git a/config/picflag.m4 b/config/picflag.m4
index 3bd49af..3f3ac74 100644
--- a/config/picflag.m4
+++ b/config/picflag.m4
@@ -44,6 +44,9 @@ case "${$2}" in
# sets the default TLS model and affects inlining.
$1=-fPIC
;;
+ loongarch*-*-*)
+ $1=-fpic
+ ;;
mips-sgi-irix6*)
# PIC is the default.
;;
diff --git a/libiberty/configure b/libiberty/configure
index 451af49..1ccfac9 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5349,6 +5349,9 @@ case "${host}" in
# sets the default TLS model and affects inlining.
PICFLAG=-fPIC
;;
+ loongarch*-*-*)
+ PICFLAG=-fpic
+ ;;
mips-sgi-irix6*)
# PIC is the default.
;;