All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Menzel <paulepanter@users.sourceforge.net>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Build error with clang 4.0
Date: Tue, 27 Dec 2016 16:10:32 +0100	[thread overview]
Message-ID: <1482851432.3916.196.camel@users.sourceforge.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

Dear GRUB folks,


Using Clang 4.0 the build fails with the error below.

```
$ sudo apt install clang-4.0 # Debian Sid/unstable
$ clang-4.0 --version
clang version 4.0.0-svn286225-1 (trunk)
Target: i686-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ git log --oneline -1
ce95549cc efi: properly terminate filepath with NULL in chainloader
$ ./autoconf.sh
$ CC=clang-4.0 ../grub/configure --with-platform=coreboot --enable-boot-time
$ make -j
[…]
../grub/grub-core/fs/hfs.c:699:10: error: taking address of packed member 'catalog_recs' of class or structure 'grub_hfs_sblock' may result in an unaligned pointer
      value [-Werror,-Waddress-of-packed-member]
                                        ? (&data->sblock.catalog_recs)
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
../grub/grub-core/fs/hfs.c:700:10: error: taking address of packed member 'extent_recs' of class or structure 'grub_hfs_sblock' may result in an unaligned pointer
      value [-Werror,-Waddress-of-packed-member]
                                        : (&data->sblock.extent_recs));
                                            ^~~~~~~~~~~~~~~~~~~~~~~~
[…]
```

The build succeeds using gcc (Debian 6.2.1-7) 6.2.1 20161215, so I am
unsure if this is a Clang issue.


Kind regards,

Paul

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

             reply	other threads:[~2016-12-27 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27 15:10 Paul Menzel [this message]
2016-12-30 15:44 ` Build error with clang 4.0 Andrei Borzenkov
2017-01-06 22:34   ` [solved] " Paul Menzel

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=1482851432.3916.196.camel@users.sourceforge.net \
    --to=paulepanter@users.sourceforge.net \
    --cc=grub-devel@gnu.org \
    /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.