All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Various build failures in current bzr tree
Date: Fri, 10 Feb 2012 19:57:35 +0100	[thread overview]
Message-ID: <4F35689F.40904@gmail.com> (raw)
In-Reply-To: <20120210181523.GC27742@caffeine.csclub.uwaterloo.ca>

On 10.02.2012 19:15, Lennart Sorensen wrote:
> On Fri, Feb 10, 2012 at 05:02:42PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> Yes, those are annoying but important since otherwise GCC might
>> misoptimise the code.
> I will grab the latest code again and run the compiler and get the
> exact message.
>
>>> Funny, the changelog says it was removed from powerpc about 3 weeks ago
>>> by you:
>>>
>>> 2012-01-18  Vladimir Serbinenko<phcoder@gmail.com>
>>>
>>>          * grub-core/kern/powerpc/dl.c (grub_arch_dl_get_tramp_got_size): Remove
>>>          set but not used variable.
>> Read again: I've just removed an unused variable.
> Hmm I misread it.  You didn't remove grub_arch_dl_get_tramp_got_size,
> just something in it.  I wonder why the linker can find
> grub_arch_dl_get_tramp_got_size then.
>
>>> Actually removing powerpc from here builds successfully and grub
>>> is booting the machine, so it seems to work without it.
>> It results in memory corruption.
> Where should grub_arch_dl_get_tramp_got_size come from?  The linker
> whines about it.
>
> So here are errors and warnings I am seeing with a current checkout:
>
> gcc-4.4 -DHAVE_CONFIG_H -I. -I../..  -Wall -W -I./include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"/usr/lib/grub\" -DLOCALEDIR=\"/usr/share/locale\"  -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=POWERPC_EMU -DGRUB_TARGET_CPU_POWERPC=1 -DGRUB_FILE=\"util/getroot.c\" -I. -I../.. -I. -I../.. -I../../include -I./include  -I./grub-core/gnulib -I../../grub-core/gnulib                -g -Wall -O2 -Wall -W -Wshadow -Wold-style-declaration -Wold-style-definition -Wpointer-arith -Wmissing-prototypes -Wundef -Wextra -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Winline -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector -Wstrict-aliasing -Wstrict-overflow -Wswitch -Wsync-nand -Wtrigraphs  -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wmissing-declarations -Wmissing-parameter-type  -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wpointer-sign -Werror  -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-old-style-definition                -c -o util/libgrubkern_a-getroot.o `test -f 'util/getroot.c' || echo '../../'`util/getroot.c
> cc1: warnings being treated as errors
> ../../util/getroot.c: In function 'find_partition':
> ../../util/getroot.c:1995: error: format '%lu' expects type 'long unsigned int', but argument 3 has type 'grub_disk_addr_t'
> ../../util/getroot.c: In function 'grub_util_biosdisk_get_grub_dev':
> ../../util/getroot.c:2025: error: format '%lu' expects type 'long unsigned int', but argument 3 has type 'grub_disk_addr_t'
>
> Then after changing %lu to %llu I get:
>
> gcc-4.4 -DHAVE_CONFIG_H -I. -I../..  -Wall -W -I./include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"/usr/lib/grub\" -DLOCALEDIR=\"/usr/share/locale\"  -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=POWERPC_EMU -DGRUB_TARGET_CPU_POWERPC=1 -DGRUB_FILE=\"util/getroot.c\" -I. -I../.. -I. -I../.. -I../../include -I./include  -I./grub-core/gnulib -I../../grub-core/gnulib                -g -Wall -O2 -Wall -W -Wshadow -Wold-style-declaration -Wold-style-definition -Wpointer-arith -Wmissing-prototypes -Wundef -Wextra -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Winline -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector -Wstrict-aliasing -Wstrict-overflow -Wswitch -Wsync-nand -Wtrigraphs  -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wmissing-declarations -Wmissing-parameter-type  -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wpointer-sign -Werror  -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-old-style-definition                -c -o util/libgrubkern_a-getroot.o `test -f 'util/getroot.c' || echo '../../'`util/getroot.c
> cc1: warnings being treated as errors
> ../../util/getroot.c: In function 'grub_find_root_devices_from_mountinfo':
> ../../util/getroot.c:448: error: assuming signed overflow does not occur when simplifying conditional to constant
> ../../util/getroot.c:448: error: assuming signed overflow does not occur when simplifying conditional to constant
>
> I am not even sure what that one means.  It's a new one to me.
Try this:
=== modified file 'util/getroot.c'
--- util/getroot.c    2012-02-10 12:17:12 +0000
+++ util/getroot.c    2012-02-10 18:48:24 +0000
@@ -372,7 +372,7 @@ grub_find_root_devices_from_mountinfo (c
    char *buf = NULL;
    size_t len = 0;
    char **ret = NULL;
-  int entry_len = 0, entry_max = 4;
+  grub_size_t entry_len = 0, entry_max = 4;
    struct mountinfo_entry *entries;
    struct mountinfo_entry parent_entry = { 0, 0, 0, "", "", "", "" };
    int i;
@@ -1991,7 +1991,7 @@ grub_util_biosdisk_get_grub_dev (const c
              const grub_partition_t partition)
        {
      grub_disk_addr_t part_start = 0;
-    grub_util_info ("Partition %d starts from %lu",
+    grub_util_info ("Partition %d starts from %" PRIuGRUB_UINT64_T,
              partition->number, partition->start);

      part_start = grub_partition_get_start (partition);
@@ -2022,7 +2022,7 @@ grub_util_biosdisk_get_grub_dev (const c
      return 0;
        }

-    grub_util_info ("%s starts from %lu", os_dev, start);
+    grub_util_info ("%s starts from %" PRIuGRUB_UINT64_T, os_dev, start);

      if (start == 0 && device_is_wholedisk (os_dev))
        return name;


>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




  reply	other threads:[~2012-02-10 18:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 19:02 Various build failures in current bzr tree Lennart Sorensen
2012-02-09 19:33 ` Lennart Sorensen
2012-02-09 20:50   ` Lennart Sorensen
2012-02-09 20:56     ` Lennart Sorensen
2012-02-09 23:02       ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 15:54         ` Lennart Sorensen
2012-02-10 16:11           ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 18:18             ` Lennart Sorensen
2012-02-10 19:01               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 19:12                 ` Lennart Sorensen
2012-02-10 19:41                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 19:56                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 20:31                     ` Lennart Sorensen
2012-02-10 20:39                       ` Lennart Sorensen
2012-02-10 16:16     ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 18:31       ` Lennart Sorensen
2012-02-09 22:59 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 15:45   ` Lennart Sorensen
2012-02-10 16:02     ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 18:15       ` Lennart Sorensen
2012-02-10 18:57         ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2012-02-10 19:05           ` Lennart Sorensen
2012-02-10 18:58         ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 19:08           ` Lennart Sorensen
2012-02-10 19:14             ` Lennart Sorensen
2012-02-10 19:25               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 20:25                 ` Lennart Sorensen
2012-02-10 20:38                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 20:43                     ` Lennart Sorensen
2012-02-10 23:14                       ` Lennart Sorensen
2012-02-10 23:38                         ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]                           ` <20120212000258.GP27742@caffeine.csclub.uwaterloo.ca>
2012-02-12  1:02                             ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-12 17:35                               ` Lennart Sorensen
2012-02-12 17:41                                 ` Lennart Sorensen
2012-02-12 20:19                                 ` Bruce Dubbs
2012-02-12 20:29                                   ` Lennart Sorensen
2012-02-13 15:39                               ` Lennart Sorensen
2012-02-15 17:04                                 ` Lennart Sorensen
2012-02-10 19:01         ` Lennart Sorensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F35689F.40904@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=lsorense@csclub.uwaterloo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.