Revision 14c47b54b0d9389e3ca0718e805cdd90c5a4303a authored by Mikulas Patocka on 02 December 2017, 22:17:44 UTC, committed by Ingo Molnar on 06 December 2017, 21:38:14 UTC
The new ORC unwinder breaks the build of a 64-bit kernel on a 32-bit
host.  Building the kernel on a i386 or x32 host fails with:

  orc_dump.c: In function 'orc_dump':
  orc_dump.c:105:26: error: passing argument 2 of 'elf_getshdrnum' from incompatible pointer type [-Werror=incompatible-pointer-types]
    if (elf_getshdrnum(elf, &nr_sections)) {
                            ^
  In file included from /usr/local/include/gelf.h:32:0,
                   from elf.h:22,
                   from warn.h:26,
                   from orc_dump.c:20:
  /usr/local/include/libelf.h:304:12: note: expected 'size_t * {aka unsigned int *}' but argument is of type 'long unsigned int *'
   extern int elf_getshdrnum (Elf *__elf, size_t *__dst);
              ^~~~~~~~~~~~~~
  orc_dump.c:190:17: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'Elf64_Sxword {aka long long int}' [-Werror=format=]
      printf("%s+%lx:", name, rela.r_addend);
                 ~~^          ~~~~~~~~~~~~~
                 %llx

Fix the build failure.

Another problem is that if the user specifies HOSTCC or HOSTLD
variables, they are ignored in the objtool makefile.  Change the
Makefile to respect these variables.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sven Joachim <svenjoac@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 627fce14809b ("objtool: Add ORC unwind table generation")
Link: http://lkml.kernel.org/r/19f0e64d8e07e30a7b307cd010eb780c404fe08d.1512252895.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 5b1ead6
History
File Mode Size
partitions
Kconfig -rw-r--r-- 6.2 KB
Kconfig.iosched -rw-r--r-- 2.7 KB
Makefile -rw-r--r-- 1.5 KB
badblocks.c -rw-r--r-- 14.5 KB
bfq-cgroup.c -rw-r--r-- 33.6 KB
bfq-iosched.c -rw-r--r-- 170.4 KB
bfq-iosched.h -rw-r--r-- 31.4 KB
bfq-wf2q.c -rw-r--r-- 52.0 KB
bio-integrity.c -rw-r--r-- 13.8 KB
bio.c -rw-r--r-- 49.5 KB
blk-cgroup.c -rw-r--r-- 37.8 KB
blk-core.c -rw-r--r-- 101.1 KB
blk-exec.c -rw-r--r-- 2.9 KB
blk-flush.c -rw-r--r-- 17.0 KB
blk-integrity.c -rw-r--r-- 12.1 KB
blk-ioc.c -rw-r--r-- 11.0 KB
blk-lib.c -rw-r--r-- 10.6 KB
blk-map.c -rw-r--r-- 5.8 KB
blk-merge.c -rw-r--r-- 19.7 KB
blk-mq-cpumap.c -rw-r--r-- 1.7 KB
blk-mq-debugfs.c -rw-r--r-- 23.5 KB
blk-mq-debugfs.h -rw-r--r-- 2.1 KB
blk-mq-pci.c -rw-r--r-- 1.6 KB
blk-mq-rdma.c -rw-r--r-- 1.7 KB
blk-mq-sched.c -rw-r--r-- 15.9 KB
blk-mq-sched.h -rw-r--r-- 2.8 KB
blk-mq-sysfs.c -rw-r--r-- 8.2 KB
blk-mq-tag.c -rw-r--r-- 11.3 KB
blk-mq-tag.h -rw-r--r-- 2.3 KB
blk-mq-virtio.c -rw-r--r-- 1.7 KB
blk-mq.c -rw-r--r-- 72.3 KB
blk-mq.h -rw-r--r-- 5.2 KB
blk-settings.c -rw-r--r-- 28.7 KB
blk-softirq.c -rw-r--r-- 4.3 KB
blk-stat.c -rw-r--r-- 4.8 KB
blk-stat.h -rw-r--r-- 5.5 KB
blk-sysfs.c -rw-r--r-- 23.4 KB
blk-tag.c -rw-r--r-- 10.0 KB
blk-throttle.c -rw-r--r-- 67.8 KB
blk-timeout.c -rw-r--r-- 5.8 KB
blk-wbt.c -rw-r--r-- 17.5 KB
blk-wbt.h -rw-r--r-- 4.0 KB
blk-zoned.c -rw-r--r-- 7.6 KB
blk.h -rw-r--r-- 9.9 KB
bounce.c -rw-r--r-- 6.5 KB
bsg-lib.c -rw-r--r-- 7.5 KB
bsg.c -rw-r--r-- 22.8 KB
cfq-iosched.c -rw-r--r-- 127.1 KB
cmdline-parser.c -rw-r--r-- 4.9 KB
compat_ioctl.c -rw-r--r-- 10.9 KB
deadline-iosched.c -rw-r--r-- 11.2 KB
elevator.c -rw-r--r-- 27.2 KB
genhd.c -rw-r--r-- 47.8 KB
ioctl.c -rw-r--r-- 15.2 KB
ioprio.c -rw-r--r-- 5.0 KB
kyber-iosched.c -rw-r--r-- 21.3 KB
mq-deadline.c -rw-r--r-- 16.8 KB
noop-iosched.c -rw-r--r-- 2.6 KB
opal_proto.h -rw-r--r-- 9.3 KB
partition-generic.c -rw-r--r-- 16.8 KB
scsi_ioctl.c -rw-r--r-- 19.9 KB
sed-opal.c -rw-r--r-- 58.5 KB
t10-pi.c -rw-r--r-- 4.9 KB

back to top