Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 360513 | Differences between
and this patch

Collapse All | Expand All

(-)ChangeLog (+7 lines)
Lines 1-3 Link Here
1
2011-09-26  Colin Watson  <cjwatson@ubuntu.com>
2
3
	* configure.ac: Build stage2 with -fno-reorder-functions to prevent
4
	unlikely-to-be-executed functions being reordered before _start with
5
	GCC 4.6.
6
	Fixes Ubuntu bug #837815.
7
1
2010-01-25  Robert Millan  <rmh.grub@aybabtu.com>
8
2010-01-25  Robert Millan  <rmh.grub@aybabtu.com>
2
9
3
	* stage2/imgact_aout.h: Rewrite using aout.h from GRUB 1.97.2 as
10
	* stage2/imgact_aout.h: Rewrite using aout.h from GRUB 1.97.2 as
(-)configure.ac (+16 lines)
Lines 114-119 Link Here
114
    if test "x$grub_cv_cc_no_stack_protector" = xyes; then
114
    if test "x$grub_cv_cc_no_stack_protector" = xyes; then
115
      STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector"
115
      STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector"
116
    fi
116
    fi
117
    # GCC >= 3.3 supports -fno-reorder-functions; this defends us against
118
    # unlikely-to-be-executed functions being linked before _start with GCC
119
    # >= 4.6.
120
    AC_CACHE_CHECK([whether gcc has -fno-reorder-functions],
121
		   no_reorder_functions_flag, [
122
      saved_CFLAGS=$CFLAGS
123
      CFLAGS="-fno-reorder-functions"
124
      AC_TRY_COMPILE(,
125
		     ,
126
		     no_reorder_functions_flag=yes,
127
		     no_reorder_functions_flag=no)
128
      CFLAGS=$saved_CFLAGS
129
    ])
130
    if test "x$no_reorder_functions_flag" = xyes; then
131
      STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-reorder-functions"
132
    fi
117
  fi
133
  fi
118
fi
134
fi
119
135

Return to bug 360513