1. 30 Jan, 2017 1 commit
    • Vladimir Serbinenko's avatar
      Fix -nopie/-nopie check. · b53f595b
      Vladimir Serbinenko authored
      We don't use lgcc_s but missing lgcc_s or another library cause test to fail.
      So use -nostdlib.
      We need to use -Werror to avoid warning-generated case to be accepted.
      Clang uses -nopie rather than -no-pie. Check both and use whichever one works.
      Additionally android clang passes -pie to the linker even though it doesn't
      define __PIE__. So if compilation without no-pie logic fails add -nopie/-no-pie
      even if __PIE__ is not defined.
      b53f595b
  2. 14 Dec, 2016 1 commit
    • Magnus Granberg's avatar
      configure: add check for -no-pie if the compiler default to -fPIE · a3e9da05
      Magnus Granberg authored
      When Grub is compile with gcc 6.1 that have --enable-defult-pie set.
      It fail with.
      -ffreestanding   -m32 -Wl,-melf_i386 -Wl,--build-id=none  -nostdlib -Wl,-N -Wl,-r,-d   -
      o trig.module  trig_module-trigtables.o
      grep 'MARKER' gcry_whirlpool.marker.new > gcry_whirlpool.marker; rm -f
      gcry_whirlpool.marker.new
      /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: -r and -
      shared may not be used together
      collect2: error: ld returned 1 exit status
      Makefile:26993: recipe for target 'trig.module' failed
      
      Check that compiler supports -no-pie and add it to linker flags.
      a3e9da05
  3. 05 Jul, 2015 1 commit
  4. 21 Feb, 2015 1 commit
  5. 18 Jan, 2014 1 commit
    • Andrey Borzenkov's avatar
      fix removal of {cpu,machine} links on mingw/msys · e0a85094
      Andrey Borzenkov authored
      At least on Windows 2003 using "ln -s dir1 dir2" in msys shell succeeds,
      but results in what looks like hard link. Subsequent "rm -f dir2" (e.g.
      during second config.status invocation) fails. Check that we also can
      remove link to directory.
      
      Make it more clear in message that we are checking "ln -s".
      e0a85094
  6. 16 Dec, 2013 1 commit
  7. 30 Nov, 2013 1 commit
  8. 14 Nov, 2013 3 commits
  9. 13 Nov, 2013 1 commit
  10. 07 Nov, 2013 2 commits
  11. 21 Aug, 2013 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * INSTALL: Document cross-compilation. · fc97214f
      Vladimir 'phcoder' Serbinenko authored
      	* acinclude.m4: Determine whether nm support -P and --defined-only.
      	* configure.ac: Add TARGET_ to all variables pertaining to target
      	that don't have it yet.
      	* gentpl.py: Likewise.
      	* grub-core/Makefile.am: Likewise.
      	* grub-core/genmod.sh.in: Likewise.
      	* grub-core/gensyminfo.sh.in: Handle OpenBSD and other non-GNU nm
      	as well.
      fc97214f
  12. 07 Jun, 2013 1 commit
  13. 03 May, 2013 1 commit
  14. 28 Dec, 2012 1 commit
    • Colin Watson's avatar
      Apply program name transformations at build-time rather than at · fd49ceb3
      Colin Watson authored
      run-time.  Fixes Debian bug #696465.
      
      * acinclude.m4 (grub_TRANSFORM): New macro.
      * configure.ac: Create output variables with transformed names for
      most programs.
      * util/bash-completion.d/grub-completion.bash.in: Use
      pre-transformed variables for program names.
      * util/grub-install.in: Likewise.
      * util/grub-kbdcomp.in: Likewise.
      * util/grub-mkconfig.in: Likewise.
      * util/grub-mkconfig_lib.in: Likewise.
      * util/grub-mknetdir.in: Likewise.
      * util/grub-mkrescue.in: Likewise.
      * util/grub-mkstandalone.in: Likewise.
      * util/grub-reboot.in: Likewise.
      * util/grub-set-default.in: Likewise.
      * util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
      * tests/util/grub-shell-tester.in: Remove unused assignment.
      * tests/util/grub-shell.in: Likewise.
      * util/grub.d/00_header.in: Likewise.
      fd49ceb3
  15. 29 Feb, 2012 1 commit
  16. 20 Aug, 2011 1 commit
  17. 19 Sep, 2010 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Split config.h for util and core. · 742f9232
      Vladimir 'phcoder' Serbinenko authored
      	* acinclude.m4 (HAVE_ASM_USCORE): Transformed into a variable.
      	(ADDR32): Likewise.
      	(DATA32): Likewise.
      	(BSS_START_SYMBOL): Likewise.
      	(END_SYMBOL): Likewise.
      	(NEED_ENABLE_EXECUTE_STACK): Likewise. All users updated.
      	(grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK): Removed.
      	* config.h.in: New file.
      	* configure.ac: Use config-util.h as config define file.
      	Rename MACHINE into GRUB_MACHINE. All users updated.
      	(NEED_REGISTER_FRAME_INFO): Transformed into a variable. All users
      	updated.
      	(NESTED_FUNC_ATTR): Likewise.
      	Substitue new variables.
      	(COND_HAVE_ASM_USCORE): New conditional.
      	* grub-core/Makefile.am (ASM_PREFIX): New variable.
      	(kernel_syms.lst): Use ASM_PREFIX.
      	* grub-core/kern/emu/console.c: Include config-util.h.
      	* grub-core/kern/emu/misc.c: Likewise.
      	* grub-core/kern/emu/mm.c: Likewise.
      	* include/grub/emu/misc.h: Likewise.
      	* include/grub/libgcc.h: Likewise.
      742f9232
  18. 18 Aug, 2010 1 commit
  19. 07 Jun, 2010 1 commit
  20. 18 Apr, 2010 1 commit
  21. 23 Jan, 2010 1 commit
  22. 18 Jan, 2010 1 commit
  23. 16 Nov, 2009 1 commit
  24. 07 Nov, 2009 1 commit
    • robertmh's avatar
      2009-11-07 Robert Millan <rmh.grub@aybabtu.com> · c926e1d5
      robertmh authored
              Fix build with GNU gold.
      
              * conf/i386-pc.rmk (boot_img_LDFLAGS, pxeboot_img_LDFLAGS)
              (diskboot_img_LDFLAGS, lnxboot_img_LDFLAGS)
              (cdboot_img_LDFLAGS): Prepend `0x' qualifier to hexadecimal
              link addresses.
              * aclocal.m4: Likewise.
      c926e1d5
  25. 16 Sep, 2009 1 commit
    • robertmh's avatar
      2009-09-16 Robert Millan <rmh.grub@aybabtu.com> · 63f745e8
      robertmh authored
              * aclocal.m4 (AC_LANG_PROGRAM): New macro.  Overrides stock
              AC_LANG_PROGRAM from autoconf.
              (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing      
              prototypes (fixes warning).
      
              * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
              `--disable-werror' was used.
      63f745e8
  26. 03 Sep, 2009 1 commit
    • robertmh's avatar
      2009-09-03 Magnus Granberg <zorry@ume.nu> · 93a81088
      robertmh authored
              * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
              include -fPIE in the default specs.
              * configure.ac: Check if pie_possible is yes and add -fno-PIE
              to TARGET_CFLAGS.
      93a81088
  27. 18 Jun, 2009 1 commit
  28. 10 Jun, 2009 1 commit
  29. 04 Jun, 2009 1 commit
    • phcoder's avatar
      2009-06-04 Vladimir Serbinenko <phcoder@gmail.com> · 2b167a72
      phcoder authored
      	Check if compiler is apple cc
      
      	* Makefile.in (ASFLAGS): new variable
      	(TARGET_ASFLAGS): likewise
      	(TARGET_MODULE_FORMAT): likewise
      	(TARGET_APPLE_CC): likewise
      	(OBJCONV): likewise
      	(TARGET_IMG_CFLAGS): likewise
      	(TARGET_CPPFLAGS): add includedir
      	* configure.ac: call grub_apple_cc and grub_apple_target_cc
      	(TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
      	Check for linker script only if compiler isn't Apple's CC
      	(TARGET_MODULE_FORMAT): set
      	(TARGET_APPLE_CC): likewise
      	(TARGET_ASFLAGS): likewise
      	(ASFLAGS): likewise
      	Check for objcopy only if compiler isn't Apple's CC
      	Check for BSS symbol only if compiler isn't Apple's CC
      	* genmk.rb: adapt nm options if we use Apple's utils
      	* aclocal.m4 (grub_apple_cc): new test
      	(grub_apple_target_cc): likewise
      	
      2b167a72
  30. 22 May, 2009 1 commit
    • proski's avatar
      2009-05-22 Pavel Roskin <proski@gnu.org> · bf6a5fb2
      proski authored
      	* aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
      	* configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
      	NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
      	compiling for the i386 targets, but not for the utilities.
      bf6a5fb2
  31. 01 Apr, 2009 2 commits
  32. 22 Mar, 2009 1 commit
    • proski's avatar
      2009-03-22 Pavel Roskin <proski@gno.org> · 41473ac2
      proski authored
      	* aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
      	* configure.ac: Don't call grub_CHECK_START_SYMBOL.
      	* kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
      41473ac2
  33. 21 Mar, 2009 1 commit
    • bean's avatar
      2009-03-21 Bean <bean123ch@gmail.com> · 1f4147aa
      bean authored
      	* util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
      	instead of stat in mingw environment.
      
      	* util/misc.c (grub_millisleep): Use Sleep in mingw environment.
      
      	* aclocal.m4 (grub_CHECK_LINK_DIR): New function.
      
      	* configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
      	AC_CONFIG_LINKS.
      1f4147aa
  34. 21 Sep, 2008 1 commit
    • fzielcke's avatar
      008-09-21 Felix Zielcke <fzielcke@z-51.de> · eb73121d
      fzielcke authored
      	* configure.ac (AC_INIT): Quote version number.
      	(AC_PREREQ): Bumped to 2.59.
      	(AC_TRY_COMPILE): Replace obsolete macro with ...
      	(AC_COMPILE_IFELSE): ... this.
      	* aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
      	(AC_LINK_IFELSE): ... this.
      eb73121d
  35. 19 Sep, 2008 1 commit
    • chrfranke's avatar
      2008-09-19 Christian Franke <franke@computer.org> · 9035dce4
      chrfranke authored
      	* aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
      	* configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
      	* include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
      	Export __enable_execute_stack() to modules.
      	* kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
      	New function.
      9035dce4
  36. 24 Jul, 2008 1 commit
    • bean's avatar
      2008-07-24 Bean <bean123ch@gmail.com> · 2a8a80e4
      bean authored
      	* common.rmk (bin_UTILITIES): Add grub-pe2elf.
      	(grub_pe2elf_SOURCES): New macro.
      	(CLEANFILES): Add grub-pe2elf.
      
      	* include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
      	(GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
      	(GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
      	(GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
      	(GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
      	(GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
      	(GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
      	(GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
      	(GRUB_PE32_SCN_ALIGN_MASK): Likewise.
      	(GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
      	(GRUB_PE32_SYM_CLASS_STATIC): Likewise.
      	(GRUB_PE32_SYM_CLASS_FILE): Likewise.
      	(GRUB_PE32_DT_FUNCTION): Likewise.
      	(GRUB_PE32_REL_I386_DIR32): Likewise.
      	(GRUB_PE32_REL_I386_REL32): Likewise.
      	(grub_pe32_symbol): New structure.
      	(grub_pe32_reloc): Likewise.
      
      	* util/grub-pe2elf.c: New file.
      
      	* configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
      	start symbol in non pc platform.
      
      	* genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
      
      	The following patches are from Christian Franke.
      
      	* include/grub/dl.h: Remove .previous, gas supports this only
      	for ELF format.
      
      	* include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
      	Remove .type, gas supports this only for ELF format.
      
      	* kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
      	nullbytes in symbol table. This fixes an infinite loop if table is
      	zero filled.
      
      	* Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
      	TARGET_IMG_LDFLAGS and EXEEXT.
      
      	* aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
      	TARGET_IMG_LDFLAGS_AC.
      	(grub_CHECK_STACK_ARG_PROBE): New function.
      
      	* conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
      
      	* conf/i386-pc-cygwin-ld-img.sc: New linker script.
      
      	* configure.ac: Add check for linker script "conf/${target}-img-ld.c"
      	to set TARGET_IMG_LD* accordingly.
      	Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
      	Add call to grub_CHECK_STACK_ARG_PROBE.
      	Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
      
      	* genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
      
      	* genmk.rb: Add EXEEXT to CLEANFILES.
      2a8a80e4