--- gcc/config/xm-sun386i.h 2018/04/24 16:53:28 1.1 +++ gcc/config/xm-sun386i.h 2018/04/24 16:57:14 1.1.1.2 @@ -42,7 +42,7 @@ the Free Software Foundation, 675 Mass A #define bzero(a,b) memset (a,0,b) #define bcmp(a,b,c) memcmp (a,b,c) -#define LINK_SPEC "%{!e*:-e _start} -dc -dp %{g:-Bstatic}" +#define LINK_SPEC "%{!e*:-e _start} -dc -dp %{g:-Bstatic} %{static:-Bstatic} %{-Bstatic}" #ifdef __GNUC__ #define alloca(n) __builtin_alloca(n)