Building on the AMD64
Hi,
Here is a patch to make it possible to build GRUB 2 on the AMD64. I hope this is the cleanest way to solve this, but please correct me if I am wrong; I am not that familiar with autoconf, etc.
I have added a new set of types starting with `grub_host_'. The types like grub_size_t had a size depending on the host machine, which meant grub-setup etc. also used a grub_size_t depending on the host size. Still we need a grub_size_t specific for the host and it should be accessible from grub-mkimage (otherwise the grub_module header created on the AMD64 is too big).
The result from compiling on the AMD64 was tested on a PC and it worked perfectly. I also tried if it still compiles on a PC and it still did.
What I didn't do is testing the result on an AMD64 box, I will do that later (it means rebooting my desktop, which I prefer not to do that often...). There are some warnings on the AMD64 that do not show up on the PC. I have included all warnings in this email. Especially the warnings about the differ in signedness confuses me, I hope someone else knows where it comes from and how to solve it.
I want to commit this patch ASAP. I will commit it this Friday unless someone has a problem with that. I need this patch applied so I can work on the PC port again, or at least test it now.
Thanks,
Marco
2005-09-20 Marco Gerards <[email protected]>
* configure.ac: Accept x86_64' as host_cpu. In that case add -m32' to CFLAGS.
* genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when linking.
* conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'. (COMMON_LDFLAGS): New variable.
(kernel_img_LDFLAGS): Include `COMMON_FLAGS'. (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS) (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS) (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS) (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS) (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS) (help_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS) (vga_mod_LDFLAGS, font_mod_LDFLAGS, terminfo_mod_LDFLAGS) (serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS, multiboot_mod_LDFLAGS) (amiga_mod_LDFLAGS, apple_mod_LDFLAGS, pc_mod_LDFLAGS) (sun_mod_LDFLAGS, loopback_mod_LDFLAGS, default_mod_LDFLAGS) (timeout_mod_LDFLAGS, configfile_mod_LDFLAGS, vbe_mod_LDFLAGS) (vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS, vbetest_mod_LDFLAGS) (search_mod_LDFLAGS, gzio_mod_LDFLAGS): New variables. (normal_mod_ASFLAGS): Add `-m32'.
* include/grub/types.h (grub_host_addr_t, grub_host_off_t) (grub_host_size_t, grub_host_ssize_t): New types. (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type dependant of GRUB_CPU_SIZEOF_VOID_P' instead on GRUB_HOST_SIZEOF_VOID_P'.
* include/grub/kernel.h (struct grub_module_header): Type of member offset changed to grub_host_off_t'. Type of member size change to grub_host_size_t'.
(struct grub_module_info): Type of member offset changed to grub_host_off_t'. Type of member size change to grub_host_size_t'.
Index: configure.ac
===================================================================
RCS file: /cvsroot/grub/grub2/configure.ac,v
retrieving revision 1.13
configure.ac +7 -0
@@ -22,6 +22,7 @@ AC_CANONICAL_HOST case "$host_cpu" in i[[3456]]86) host_cpu=i386 ;; + x86_64) host_cpu=i386 amd64=1 ;; powerpc) ;; sparc64) ;; *) AC_MSG_ERROR([unsupported CPU type]) ;;
@@ -78,6 +79,10 @@ if test "x$default_CFLAGS" = xyes; then fi fi + if test "x$amd64" = x1; then + tmp_CFLAGS="$tmp_CFLAGS -m32" + fi + CFLAGS="$tmp_CFLAGS" fi AC_SUBST(CFLAGS)
@@ -122,10 +127,12 @@ fi # Test the C compiler for the build environment. tmp_CC="$CC" tmp_CFLAGS="$CFLAGS" +tmp_LDFLAGS="$LDFLAGS" tmp_CPPFLAGS="$CPPFLAGS" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS" +LDFLAGS="$BUILD_LDDFLAGS" # Identify characteristics of the build architecture. AC_C_BIGENDIAN
Index: genmk.rb
===================================================================
RCS file: /cvsroot/grub/grub2/genmk.rb,v
retrieving revision 1.16
genmk.rb +2 -2
@@ -118,12 +118,12 @@ UNDSYMFILES += #{undsym} #{@name}: #{pre_obj} #{mod_obj} -rm -f $@ - $(LD) -r -d -o $@ $^ + $(LD) $(#{prefix}_LDFLAGS) $(LDFLAGS) -r -d -o $@ $^ $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@ #{pre_obj}: #{objs_str} -rm -f $@ - $(LD) -r -d -o $@ $^ + $(LD) $(#{prefix}_LDFLAGS) -r -d -o $@ $^ #{mod_obj}: #{mod_src} $(CC) $(CPPFLAGS) $(CFLAGS) $(#{prefix}_CFLAGS) -c -o $@ $<
Index: conf/i386-pc.rmk
===================================================================
RCS file: /cvsroot/grub/grub2/conf/i386-pc.rmk,v
retrieving revision 1.45
i386-pc.rmk +47 -4
231 lines not on this page · raw message
Index: include/grub/kernel.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/kernel.h,v retrieving revision 1.6
grub/kernel.h +4 -4
@@ -26,9 +26,9 @@struct grub_module_header {/* The offset of object code. */ -grub_off_t offset; +grub_host_off_t offset;/* The size of object code plus this header. */ -grub_size_t size; +grub_host_size_t size; };/* "gmim" (GRUB Module Info Magic). */
@@ -39,9 +39,9 @@ struct grub_module_info/* Magic number so we know we have modules present. */ grub_uint32_t magic;/* The offset of the modules. */ -grub_off_t offset; +grub_host_off_t offset;/* The size of all modules plus this header. */ -grub_size_t size; +grub_host_size_t size; };extern grub_addr_t grub_arch_modules_addr (void );
Index: include/grub/types.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/types.h,v retrieving revision 1.5
grub/types.h +12 -0
@@ -70,6 +70,18 @@ typedef unsigned long long grub_uint64_t/* Misc types. */ #if GRUB_HOST_SIZEOF_VOID_P ==8 +typedef grub_uint64_t grub_host_addr_t ; +typedef grub_uint64_t grub_host_off_t ; +typedef grub_uint64_t grub_host_size_t ; +typedef grub_int64_t grub_host_ssize_t ; +#else +typedef grub_uint32_t grub_host_addr_t ; +typedef grub_uint32_t grub_host_off_t ; +typedef grub_uint32_t grub_host_size_t ; +typedef grub_int32_t grub_host_ssize_t ; +#endif + +#if GRUB_CPU_SIZEOF_VOID_P ==8 typedef grub_uint64_t grub_addr_t ;typedef grub_uint64_t grub_off_t ;typedef grub_uint64_t grub_size_t ;
util/i386/pc/grub-mkimage.c: In function 'compress_kernel':util/i386/pc/grub-mkimage.c:67: warning: pointer targets in passing argument 1 of 'lzo1x_999_compress' differ in signedness util/i386/pc/grub-mkimage.c:67: warning: pointer targets in passing argument 3 of 'lzo1x_999_compress' differ in signedness kern/misc.c:176: warning: conflicting types for built-in function 'memcmp'fs/fat.c: In function 'grub_fat_mount':fs/fat.c:246: warning: large integer implicitly truncated to unsigned typefs/fat.c:300: warning: large integer implicitly truncated to unsigned typefs/fat.c: In function 'grub_fat_read_data':fs/fat.c:325: warning: comparison is always false due to limited range of data typefs/fat.c: In function 'grub_fat_find_dir':fs/fat.c:560: warning: pointer targets in passing argument 1 of 'grub_utf16_to_utf8' differ in signedness fs/fat.c:620: warning: large integer implicitly truncated to unsigned typefs/fat.c: In function 'grub_fat_label':fs/fat.c:782: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/ufs.c: In function 'grub_ufs_lookup_symlink':fs/ufs.c:366: warning: pointer targets in passing argument 2 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'grub_hfs_mount':fs/hfs.c:380: warning: pointer targets in passing argument 1 of 'grub_strcpy' differ in signedness fs/hfs.c:380: warning: pointer targets in passing argument 2 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'grub_hfs_cmp_catkeys':fs/hfs.c:416: warning: pointer targets in passing argument 1 of 'grub_strncasecmp' differ in signedness fs/hfs.c:416: warning: pointer targets in passing argument 2 of 'grub_strncasecmp' differ in signedness fs/hfs.c: In function 'grub_hfs_find_dir':fs/hfs.c:696: warning: pointer targets in passing argument 1 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'dir_hook':fs/hfs.c:740: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/hfs.c: In function 'grub_hfs_label':fs/hfs.c:857: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/jfs.c: In function 'grub_jfs_mount':fs/jfs.c:345: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/jfs.c: In function 'grub_jfs_opendir':fs/jfs.c:401: warning: pointer targets in assignment differ in signednessfs/jfs.c: In function 'grub_jfs_getent':fs/jfs.c:533: warning: pointer targets in passing argument 1 of 'grub_utf16_to_utf8' differ in signedness fs/jfs.c: In function 'grub_jfs_lookup_symlink':fs/jfs.c:706: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/jfs.c: In function 'grub_jfs_label':fs/jfs.c:854: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness commands/cmp.c: In function 'grub_cmd_cmp':commands/cmp.c:56: warning: format '%d' expects type 'int', but argument 2 has type 'grub_ssize_t' commands/cmp.c:56: warning: format '%d' expects type 'int', but argument 4 has type 'grub_ssize_t' commands/ls.c: In function 'print_files_long':commands/ls.c:109: warning: format '%-12d' expects type 'int', but argument 2 has type 'grub_ssize_t' commands/ls.c:130: warning: format '%-12d' expects type 'int', but argument 2 has type 'grub_ssize_t' disk/loopback.c: In function 'grub_loopback_open':disk/loopback.c:179: warning: cast from pointer to integer of different sizefs/fat.c: In function 'grub_fat_mount':fs/fat.c:246: warning: large integer implicitly truncated to unsigned typefs/fat.c:300: warning: large integer implicitly truncated to unsigned typefs/fat.c: In function 'grub_fat_read_data':fs/fat.c:325: warning: comparison is always false due to limited range of data typefs/fat.c: In function 'grub_fat_find_dir':fs/fat.c:560: warning: pointer targets in passing argument 1 of 'grub_utf16_to_utf8' differ in signedness fs/fat.c:620: warning: large integer implicitly truncated to unsigned typefs/fat.c: In function 'grub_fat_label':fs/fat.c:782: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/hfs.c: In function 'grub_hfs_mount':fs/hfs.c:380: warning: pointer targets in passing argument 1 of 'grub_strcpy' differ in signedness fs/hfs.c:380: warning: pointer targets in passing argument 2 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'grub_hfs_cmp_catkeys':fs/hfs.c:416: warning: pointer targets in passing argument 1 of 'grub_strncasecmp' differ in signedness fs/hfs.c:416: warning: pointer targets in passing argument 2 of 'grub_strncasecmp' differ in signedness fs/hfs.c: In function 'grub_hfs_find_dir':fs/hfs.c:696: warning: pointer targets in passing argument 1 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'dir_hook':fs/hfs.c:740: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/hfs.c: In function 'grub_hfs_label':fs/hfs.c:857: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/iso9660.c: In function 'grub_iso9660_susp_iterate':fs/iso9660.c:172: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/iso9660.c:176: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/iso9660.c: In function 'susp_iterate':fs/iso9660.c:218: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/iso9660.c: In function 'grub_iso9660_mount':fs/iso9660.c:239: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/iso9660.c:285: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/iso9660.c: In function 'susp_iterate_sl':fs/iso9660.c:337: warning: pointer targets in passing argument 2 of 'grub_strncmp' differ in signedness fs/iso9660.c:359: warning: pointer targets in passing argument 1 of 'add_part' differ in signedness fs/iso9660.c: In function 'susp_iterate_dir':fs/iso9660.c:435: warning: pointer targets in passing argument 2 of 'grub_strncmp' differ in signedness fs/iso9660.c:460: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/iso9660.c:465: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/iso9660.c: In function 'grub_iso9660_label':fs/iso9660.c:745: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/jfs.c: In function 'grub_jfs_mount':fs/jfs.c:345: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/jfs.c: In function 'grub_jfs_opendir':fs/jfs.c:401: warning: pointer targets in assignment differ in signednessfs/jfs.c: In function 'grub_jfs_getent':fs/jfs.c:533: warning: pointer targets in passing argument 1 of 'grub_utf16_to_utf8' differ in signedness fs/jfs.c: In function 'grub_jfs_lookup_symlink':fs/jfs.c:706: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/jfs.c: In function 'grub_jfs_label':fs/jfs.c:854: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/ufs.c: In function 'grub_ufs_lookup_symlink':fs/ufs.c:366: warning: pointer targets in passing argument 2 of 'grub_strcpy' differ in signedness io/gzio.c: In function 'test_header':io/gzio.c:179: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness io/gzio.c:195: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness io/gzio.c:209: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness io/gzio.c: In function 'get_byte':io/gzio.c:369: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness kern/dl.c: In function 'grub_dl_resolve_symbols':kern/dl.c:358: warning: cast from pointer to integer of different sizekern/dl.c:369: warning: cast from pointer to integer of different sizekern/dl.c:371: warning: cast to pointer from integer of different sizekern/dl.c:377: warning: cast from pointer to integer of different sizekern/dl.c:379: warning: cast to pointer from integer of different sizekern/dl.c:383: warning: cast to pointer from integer of different sizekern/dl.c:385: warning: cast to pointer from integer of different sizekern/dl.c:390: warning: cast from pointer to integer of different sizekern/misc.c:176: warning: conflicting types for built-in function 'memcmp'normal/menu.c: In function 'print_entry':normal/menu.c:114: warning: pointer targets in passing argument 2 of 'grub_utf8_to_ucs4' differ in signedness partmap/amiga.c: In function 'amiga_partition_map_iterate':partmap/amiga.c:101: warning: pointer targets in passing argument 1 of 'grub_strcmp' differ in signedness kern/misc.c:176: warning: conflicting types for built-in function 'memcmp'fs/fat.c: In function 'grub_fat_mount':fs/fat.c:246: warning: large integer implicitly truncated to unsigned typefs/fat.c:300: warning: large integer implicitly truncated to unsigned typefs/fat.c: In function 'grub_fat_read_data':fs/fat.c:325: warning: comparison is always false due to limited range of data typefs/fat.c: In function 'grub_fat_find_dir':fs/fat.c:560: warning: pointer targets in passing argument 1 of 'grub_utf16_to_utf8' differ in signedness fs/fat.c:620: warning: large integer implicitly truncated to unsigned typefs/fat.c: In function 'grub_fat_label':fs/fat.c:782: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/ufs.c: In function 'grub_ufs_lookup_symlink':fs/ufs.c:366: warning: pointer targets in passing argument 2 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'grub_hfs_mount':fs/hfs.c:380: warning: pointer targets in passing argument 1 of 'grub_strcpy' differ in signedness fs/hfs.c:380: warning: pointer targets in passing argument 2 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'grub_hfs_cmp_catkeys':fs/hfs.c:416: warning: pointer targets in passing argument 1 of 'grub_strncasecmp' differ in signedness fs/hfs.c:416: warning: pointer targets in passing argument 2 of 'grub_strncasecmp' differ in signedness fs/hfs.c: In function 'grub_hfs_find_dir':fs/hfs.c:696: warning: pointer targets in passing argument 1 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'dir_hook':fs/hfs.c:740: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/hfs.c: In function 'grub_hfs_label':fs/hfs.c:857: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/jfs.c: In function 'grub_jfs_mount':fs/jfs.c:345: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/jfs.c: In function 'grub_jfs_opendir':fs/jfs.c:401: warning: pointer targets in assignment differ in signednessfs/jfs.c: In function 'grub_jfs_getent':fs/jfs.c:533: warning: pointer targets in passing argument 1 of 'grub_utf16_to_utf8' differ in signedness fs/jfs.c: In function 'grub_jfs_lookup_symlink':fs/jfs.c:706: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/jfs.c: In function 'grub_jfs_label':fs/jfs.c:854: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness /usr/bin/ld: warning: i386:x86-64 architecture of input file `kernel_img-kern_i386_pc_startup.o' is incompatible with i386 output fs/fat.c: In function 'grub_fat_find_dir':fs/fat.c:560: warning: pointer targets in passing argument 1 of 'grub_utf16_to_utf8' differ in signedness fs/fat.c: In function 'grub_fat_label':fs/fat.c:782: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/ext2.c: In function 'grub_ext2_read_block':fs/ext2.c:196: warning: 'blknr' may be used uninitialized in this functionfs/ufs.c: In function 'grub_ufs_lookup_symlink':fs/ufs.c:366: warning: pointer targets in passing argument 2 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'grub_hfs_mount':fs/hfs.c:380: warning: pointer targets in passing argument 1 of 'grub_strcpy' differ in signedness fs/hfs.c:380: warning: pointer targets in passing argument 2 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'grub_hfs_cmp_catkeys':fs/hfs.c:416: warning: pointer targets in passing argument 1 of 'grub_strncasecmp' differ in signedness fs/hfs.c:416: warning: pointer targets in passing argument 2 of 'grub_strncasecmp' differ in signedness fs/hfs.c: In function 'grub_hfs_find_dir':fs/hfs.c:696: warning: pointer targets in passing argument 1 of 'grub_strcpy' differ in signednessfs/hfs.c: In function 'dir_hook':fs/hfs.c:740: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/hfs.c: In function 'grub_hfs_label':fs/hfs.c:857: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness fs/jfs.c: In function 'grub_jfs_mount':fs/jfs.c:345: warning: pointer targets in passing argument 1 of 'grub_strncmp' differ in signedness fs/jfs.c: In function 'grub_jfs_opendir':fs/jfs.c:401: warning: pointer targets in assignment differ in signednessfs/jfs.c: In function 'grub_jfs_getent':fs/jfs.c:533: warning: pointer targets in passing argument 1 of 'grub_utf16_to_utf8' differ in signedness fs/jfs.c: In function 'grub_jfs_lookup_symlink':fs/jfs.c:706: warning: pointer targets in passing argument 2 of 'grub_strncpy' differ in signedness fs/jfs.c: In function 'grub_jfs_label':fs/jfs.c:854: warning: pointer targets in passing argument 1 of 'grub_strndup' differ in signedness normal/menu.c: In function 'print_entry':normal/menu.c:114: warning: pointer targets in passing argument 2 of 'grub_utf8_to_ucs4' differ in signedness font/manager.c: In function 'grub_font_get_glyph':font/manager.c:203: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness term/tparm.c: In function 'get_space':term/tparm.c:169: warning: empty body in an if-statementterm/tparm.c: In function 'grub_terminfo_tparm':term/tparm.c:476: warning: 'popcount' may be used uninitialized in this functionpartmap/amiga.c: In function 'amiga_partition_map_iterate':partmap/amiga.c:101: warning: pointer targets in passing argument 1 of 'grub_strcmp' differ in signedness io/gzio.c: In function 'test_header':io/gzio.c:179: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness io/gzio.c:195: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness io/gzio.c:209: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness io/gzio.c: In function 'get_byte':io/gzio.c:369: warning: pointer targets in passing argument 2 of 'grub_file_read' differ in signedness
Quoted 3 lines · Marco Gerards
Here is a patch to make it possible to build GRUB 2 on the AMD64. I hope this is the cleanest way to solve this, but please correct me if I am wrong; I am not that familiar with autoconf, etc.
I thought you were working on pure 64-bit support...
Okuji
Quoted 6 lines · Yoshinori K. Okuji
Quoted 3 lines · Marco Gerards
Here is a patch to make it possible to build GRUB 2 on the AMD64. I hope this is the cleanest way to solve this, but please correct me if I am wrong; I am not that familiar with autoconf, etc.
I thought you were working on pure 64-bit support...
No, what made you think that? I don't see the use of pure 64 bits support. I just want to compile GRUB 2 so I can use it.
--
Marco
Hi,
Quoted 6 lines · Marco Gerards
What I didn't do is testing the result on an AMD64 box, I will do that later (it means rebooting my desktop, which I prefer not to do that often...). There are some warnings on the AMD64 that do not show up on the PC. I have included all warnings in this email. Especially the warnings about the differ in signedness confuses me, I hope someone else knows where it comes from and how to solve it.
The grub_str* functions are taking 'char *' arguments, but in some cases in the code they are given 'usigned char *' for example. 'char' is not guaranteed to be signed or usigned on a given architecture, so for strings it should not be specified.
Quoted 1 line
2005-09-20 Marco Gerards <[email protected]>
...
Quoted 4 lines
* conf/i386-pc.rmk (
COMMON_CFLAGS): Add-m32'. (COMMON_LDFLAGS): New variable. (kernel_img_LDFLAGS): IncludeCOMMON_FLAGS'. (_chain_mod_LDFLAGS,fshelp_mod_LDFLAGS,fat_mod_LDFLAGS,
This should end with ')'.
regards,
guillem
Guillem Jover <[email protected]> writes:
Hi Guillem,
Quoted 4 lines
The grub_str* functions are taking 'char *' arguments, but in some cases in the code they are given 'usigned char *' for example. 'char' is not guaranteed to be signed or usigned on a given architecture, so for strings it should not be specified.
Right, but I wondered why the warning does not occur on the PC, I am just compiling a 32 bits GRUB 2. Or does someone have this same problem on the PC with gcc 4.0 and is this not related to my patch?
Quoted 10 lines
Quoted 1 line
2005-09-20 Marco Gerards <[email protected]>
...
Quoted 4 lines
* conf/i386-pc.rmk (
COMMON_CFLAGS): Add-m32'. (COMMON_LDFLAGS): New variable. (kernel_img_LDFLAGS): IncludeCOMMON_FLAGS'. (_chain_mod_LDFLAGS,fshelp_mod_LDFLAGS,fat_mod_LDFLAGS,This should end with ')'.
Nice catch, thanks. :-)
--
Marco