First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 1044
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Grant Goodyear <g2boojum@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Rob McMullen <robm@flipturn.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 1044 depends on: Show dependency tree
Bug 1044 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2002-03-10 08:23 0000
With the optimizations I wanted to use for compiling on the Crusoe processor:

-O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
-mpreferred-stack-boundary=2 -march=i686 -malign-functions=0 -malign-jumps=0
-malign-loops=0

the sys-apps/hdparm ebuild fails because in src_unpack(), the sed command
replaces the -mpreferred-stack-boundary with '-mpreferredtack-boundary' instead
of removing the '-s' flag from the command line as was intended.

In general, any time sed is used to place the CFLAGS in a Makefile, we ought to
do any changes/deletions to the file before we insert the CFLAGS.  In other
words, unless you really mean to potentially change the user's CFLAGS, the
CFLAGS insertion ought to come last in the sed command.

Here's a fix for hdparm.

--- hdparm-4.6.ebuild	Sun Mar 10 07:53:31 2002
+++ hdparm-4.6-r1.ebuild	Sun Mar 10 07:50:15 2002
@@ -12,7 +12,7 @@
 	unpack ${A}
 	cd ${S}
 	mv Makefile Makefile.orig
-
sed -e "s/-O2/${CFLAGS}/" -e "s:-s::" \
+
sed -e "s:-s::" -e "s/-O2/${CFLAGS}/" \
 	Makefile.orig > Makefile
 }

------- Comment #1 From Daniel Robbins (RETIRED) 2002-03-12 10:01:03 0000 -------
Grant -- I fixed this bug on CVS, but I'm reassigning it to you because we
really need to add this info to our Development HOWTO.  It's something that
never occurred to me.

------- Comment #2 From Maik Schreiber 2002-05-29 10:31:37 0000 -------
What's so different about this patch now? It still replaces things like
"-fkeep-static-consts" with "-fkeeptatic-consts" :-/

Better make that

  ... -e 's| -s||' ...

(note the space)

------- Comment #3 From Grant Goodyear 2002-07-19 10:13:14 0000 -------
Killed old version, thereby fixing the problem.
Good catch!

First Last Prev Next    No search results available      Search page      Enter new bug