+# Build lines.
+
+gcc_compile='$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES)'
+gcc_s_compile="$gcc_compile -DSHARED"
+make_compile='$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
+ AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+ AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \
+ AR_EXTRACT_FOR_TARGET="$(AR_EXTRACT_FOR_TARGET)" \
+ AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
+ CC="$(CC)" CFLAGS="$(CFLAGS)" \
+ BUILD_PREFIX="$(BUILD_PREFIX)" \
+ BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \
+ LANGUAGES="$(LANGUAGES)"'
+
+# Generic dependencies for libgcc
+libgcc_dep='$(CONFIG_H) coretypes.h $(TM_H) $(MACHMODE_H) longlong.h config.status stmp-int-hdrs tsystem.h'
+
+# Dependencies for libgcc2.c
+libgcc2_c_dep='stmp-dirs $(srcdir)/libgcc2.c $(srcdir)/libgcc2.h gbl-ctors.h'" $libgcc_dep"
+
+# Dependencies for libgcov.c
+libgcov_c_dep='stmp-dirs $(srcdir)/libgcov.c $(srcdir)/gcov-io.h $(srcdir)/gcov-io.c gcov-iov.h'" $libgcc_dep"
+
+# Dependencies for fp-bit.c
+fpbit_c_dep='stmp-dirs config.status tsystem.h'
+
+# Flag whether we need eh_dummy.c
+need_eh_dummy=
+
+if [ "$SHLIB_LINK" ]; then
+ # Test -fvisibility=hidden. We need both a -fvisibility=hidden on
+ # the command line, and a #define to prevent libgcc2.h etc from
+ # overriding that with #pragmas. The dance with @ is to prevent
+ # echo from seeing anything it might take for an option.
+ # echo turns the \$\$\$\$ into $$$$ and when make sees it it
+ # becomes $$ and the shell substitutes the pid. Makes for a
+ # slightly safer temp file.
+ echo "vis_hide := \$(strip \$(subst @,-,\\"
+ echo " \$(shell if echo 'void foo(void); void foo(void) {}' | \\"
+ echo " $gcc_compile -fvisibility=hidden -Werror \\"
+ echo " -c -xc - -o vis_temp_file\$\$\$\$.o 2> /dev/null; \\"
+ echo " then echo @fvisibility=hidden @DHIDE_EXPORTS; \\"
+ echo " rm vis_temp_file\$\$\$\$.o 2> /dev/null; \\"
+ echo " fi)))"
+ echo
+
+ # If we have -fvisibility=hidden, then we need to generate hide
+ # lists for object files implemented in assembly. The default
+ # pseudo-op for this is ".hidden", but can be overridden with
+ # ASM_HIDDEN_OP.
+ [ "$ASM_HIDDEN_OP" ] || ASM_HIDDEN_OP=".hidden"
+
+ echo "ifneq (,\$(vis_hide))"
+ echo "define gen-hide-list"
+ echo "\$(NM_FOR_TARGET) ${SHLIB_NM_FLAGS} \$< | \\"
+ # non-GNU nm emits three fields even for undefined and typeless symbols,
+ # so explicitly omit them
+ echo " \$(AWK) 'NF == 3 && \$\$2 !~ /^[UN]\$\$/ { print \"\\t${ASM_HIDDEN_OP}\", \$\$3 }' > \$@T"
+ echo "mv -f \$@T \$@"
+ echo "endef"
+ echo "else"
+ echo "gen-hide-list = echo > \$@"
+ echo "endif"
+ echo
+else
+ # It is too hard to guarantee that vis_hide and gen-hide-list will never
+ # be referenced if SHLIB_LINK is not set, so set them to the values they'd
+ # have if SHLIB_LINK were set and we didn't have visibility support.
+ echo "vis_hide ="
+ echo "gen-hide-list = echo > \$@"