From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Jiri B <jirib@devio.us>
Cc: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>,
The development of GNU GRUB <grub-devel@gnu.org>,
bug-grub@gnu.org
Subject: Re: [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition'
Date: Tue, 22 Mar 2016 20:48:03 +0300 [thread overview]
Message-ID: <56F18553.9020306@gmail.com> (raw)
In-Reply-To: <20160322103131.GH32407@wolfman.devio.us>
[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]
22.03.2016 13:31, Jiri B пишет:
>>>>> [...]
>>>>> CFLAGS=-ftrampolines -fno-stack-protector -fno-pie -nopie
>>>>>
>>>>> $ ls -l /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.im*
>>>>> -rwxr-xr-x 1 jirib wheel 3068 Mar 17 21:45 /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.image*
>>>>> -rw-r--r-- 1 jirib wheel 2832 Mar 17 21:45 /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.img
>>>>>
>>>>> [...]
>>>>>
>>
>> Good. Please test attached patch.
>>
>> [...]
>>
>> diff --git a/configure.ac b/configure.ac
>> index a85b134..57e1713 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1185,9 +1185,9 @@ CFLAGS="$TARGET_CFLAGS"
>> # Position independent executable.
>> grub_CHECK_PIE
>> [# Need that, because some distributions ship compilers that include
>> -# `-fPIE' in the default specs.
>> +# `-fPIE' or '-fpie' in the default specs.
>> if [ x"$pie_possible" = xyes ]; then
>> - TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
>> + TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -fno-pie"
>> fi]
>>
>> CFLAGS="$TARGET_CFLAGS"
>
> Thx, builds find on OpenBSD.
>
OK, so we are left with -ipath. One possibility is something like
attached patch; another - to replace ipath with -path | grep -v. Latter
is probably more readable.
[-- Attachment #2: find-ipath.patch --]
[-- Type: text/x-patch, Size: 2090 bytes --]
From: Andrei Borzenkov <arvidjaar@gmail.com>
Subject: [PATCH] autogen.sh: avoid non-portable -ipath and -iname
OpenBSD 5.9 find does not have ipath, although it supports iname. For
consistency, also replace iname with suitable pattern.
Reported By: Jiri B <jirib@devio.us>
---
autogen.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 7537561..cd254d8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,8 +8,9 @@ set -e
export LC_COLLATE=C
unset LC_ALL
-find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in
-find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
+# This avoids non-portable -iname and -ipath
+find . -name '*.[cC][hH]' ! -path './[gG][rR][uU][bB]-[cC][oO][rR][eE]/[lL][iI][bB]/[lL][iI][bB][gG][cC][rR][yY][pP][tT]-[gG][rR][uU][bB]/*' ! -path './[bB][uU][iI][lL][dD]-[aA][uU][xX]/*' ! -path './[gG][rR][uU][bB]-[cC][oO][rR][eE]/[lL][iI][bB]/[lL][iI][bB][gG][cC][rR][yY][pP][tT]/[sS][rR][cC]/[mM][iI][sS][cC].[cC]' ! -path './[gG][rR][uU][bB]-[cC][oO][rR][eE]/[lL][iI][bB]/[lL][iI][bB][gG][cC][rR][yY][pP][tT]/[sS][rR][cC]/[gG][lL][oO][bB][aA][lL].[cC]' ! -path './[gG][rR][uU][bB]-[cC][oO][rR][eE]/[lL][iI][bB]/[lL][iI][bB][gG][cC][rR][yY][pP][tT]/[sS][rR][cC]/[sS][eE][cC][mM][eE][mM].[cC]' ! -path './[uU][tT][iI][lL]/[gG][rR][uU][bB]-[gG][eE][nN]-[wW][iI][dD][tT][hH][sS][pP][eE][cC].[cC]' ! -path './[uU][tT][iI][lL]/[gG][rR][uU][bB]-[gG][eE][nN]-[aA][sS][cC][iI][iI][hH].[cC]' |sort > po/POTFILES.in
+find util -name '*.[iI][nN]' ! -name Makefile.in |sort > po/POTFILES-shell.in
echo "Importing unicode..."
${PYTHON} util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c
--
tg: (f4d35d4..) u/autogen-find-ipath (depends on: master)
next prev parent reply other threads:[~2016-03-22 17:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160312165742.GR17281@wolfman.devio.us>
2016-03-12 18:29 ` [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition' Andrei Borzenkov
2016-03-12 19:54 ` Jiri B
2016-03-13 5:41 ` Andrei Borzenkov
2016-03-14 18:19 ` Jiri B
2016-03-14 18:46 ` Andrei Borzenkov
2016-03-17 10:12 ` Jiri B
2016-03-17 15:54 ` Andrei Borzenkov
2016-03-17 16:04 ` Vladimir 'phcoder' Serbinenko
2016-03-17 16:07 ` Andrei Borzenkov
2016-03-17 20:56 ` Jiri B
2016-03-18 3:26 ` Andrei Borzenkov
2016-03-18 13:01 ` Jiri B
2016-03-18 16:53 ` Andrei Borzenkov
2016-03-18 19:48 ` Vladimir 'phcoder' Serbinenko
2016-03-22 10:31 ` Jiri B
2016-03-22 17:48 ` Andrei Borzenkov [this message]
2016-03-24 3:55 ` Andrei Borzenkov
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=56F18553.9020306@gmail.com \
--to=arvidjaar@gmail.com \
--cc=bug-grub@gnu.org \
--cc=grub-devel@gnu.org \
--cc=jirib@devio.us \
--cc=phcoder@gmail.com \
/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.