diff --git a/usr.bin/clang/Makefile.inc b/usr.bin/clang/Makefile.inc index ba32f0c1032d..a257b795b7af 100644 --- a/usr.bin/clang/Makefile.inc +++ b/usr.bin/clang/Makefile.inc @@ -12,4 +12,9 @@ DEBUG_FILES_CFLAGS= -gline-tables-only DEBUG_FILES_CFLAGS= -g1 .endif +.if ${MACHINE_ARCH:Mmips*} && ${MACHINE_ARCH:Mmips64*} == "" +CFLAGS+= -mxgot +CXXFLAGS+= -mxgot +.endif + .include "../Makefile.inc"