[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GRUB2 on OpenBSD 5.3-amd64: linking problem
From: |
Ilya Bakulin |
Subject: |
GRUB2 on OpenBSD 5.3-amd64: linking problem |
Date: |
Fri, 9 Aug 2013 15:37:28 +0200 |
Hi list,
I'm currently trying to port GRUB2 to OpenBSD 5.3-amd64.
I have attached a patch that adds missing defines and includes
to make the code build on OpenBSD. Some ./configure tricks were also
nessesary -- the old GCC in OpenBSD doesn't understand -Wempty-body option.
The build environment is the following:
# as --version
GNU assembler 2.15
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `amd64-unknown-openbsd5.3'.
# gcc -v
Reading specs from /usr/lib/gcc-lib/amd64-unknown-openbsd5.3/4.2.1/specs
Target: amd64-unknown-openbsd5.3
Configured with: OpenBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070719
So, the binutils version is 2.15 and the compiler is 4.2.1.
The ./configure command line I used is the following:
./configure CFLAGS=-ftrampolines -fno-stack-protector LEX=/usr/local/bin/gflex
TARGET_CFLAGS=-ftrampolines -fno-stack-protector
However now I have a problem on linking stage.
The last lines from build log are the following:
# gmake
gmake all-recursive
gmake[1]: Entering directory `/home/grub/grub-2.00'
Making all in grub-core/gnulib
gmake[2]: Entering directory `/home/grub/grub-2.00/grub-core/gnulib'
gmake all-recursive
gmake[3]: Entering directory `/home/grub/grub-2.00/grub-core/gnulib'
gmake[4]: Entering directory `/home/grub/grub-2.00/grub-core/gnulib'
gmake[4]: Nothing to be done for `all-am'.
gmake[4]: Leaving directory `/home/grub/grub-2.00/grub-core/gnulib'
gmake[3]: Leaving directory `/home/grub/grub-2.00/grub-core/gnulib'
gmake[2]: Leaving directory `/home/grub/grub-2.00/grub-core/gnulib'
Making all in .
gmake[2]: Entering directory `/home/grub/grub-2.00'
gmake[2]: Leaving directory `/home/grub/grub-2.00'
Making all in grub-core
gmake[2]: Entering directory `/home/grub/grub-2.00/grub-core'
gmake all-am
gmake[3]: Entering directory `/home/grub/grub-2.00/grub-core'
gcc -ftrampolines -fno-stack-protector -Wall -W -Wshadow -Wold-style-definition
-Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align
-Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization
-Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args
-Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration
-Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain
-Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute
-Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses
-Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow
-Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas
-Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value
-Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings
-Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls
-Wmissing-prototypes -Wmissing-declarations -falign-jumps=1 -falign-loops=1
-falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -m32 -fno-PIE
-fno-PIC -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines
-mrtd -mregparm=3 -ffreestanding -ftrampolines -fno-stack-protector -m32
-nostdlib -Wl,-N -Wl,-r,-d -o
trig.module trig_module-trigtables.o
/usr/bin/ld: Relocatable linking with relocations from format elf32-i386
(trig_module-trigtables.o) to format elf64-x86-64 (trig.module) is not
supported
collect2: ld returned 1 exit status
gmake[3]: *** [trig.module] Error 1
gmake[3]: Leaving directory `/home/grub/grub-2.00/grub-core'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/grub/grub-2.00/grub-core'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/grub/grub-2.00'
gmake: *** [all] Error 2
The Makefile used here is generated by ./configure and I cannot understand
what it does.
Could you please help me to solve the linking problem?
What else do you need from me?
Thanks!
--
Ilya
obsd_grub2.diff
Description: Text Data
signature.asc
Description: This is a digitally signed message part.
- GRUB2 on OpenBSD 5.3-amd64: linking problem,
Ilya Bakulin <=