Bug 199887 - clisp.spec must set CFLAGS=""
Summary: clisp.spec must set CFLAGS=""
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: clisp
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Gérard Milmeister
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-24 00:13 UTC by Sam Steingold
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-07-28 18:12:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sam Steingold 2006-07-24 00:13:17 UTC
+++ This bug was initially created as a clone of Bug #199525 +++

"clisp --version" insicates that it has beed built with debugging symbols.
this is because clisp configure now respects the environment variable CFLAGS
and when it is not set uses "-g -O2" as per GNU standards.
please re-configure CLISP with CFLAGS="":
CFLAGS="" ./configure ....
thanks.

-- Additional comment from sds on 2006-07-23 14:17 EST --
(In reply to comment #3)
> (In reply to comment #1)
> > "clisp --version" insicates that it has beed built with debugging symbols.
> > this is because clisp configure now respects the environment variable CFLAGS
> > and when it is not set uses "-g -O2" as per GNU standards.
> > please re-configure CLISP with CFLAGS="":
> > CFLAGS="" ./configure ....
> > thanks.
> Currently CFLAGS is not set at all in the .spec file.
> Could you explain, why unsetting CFLAGS is necessary?

when CFLAGS is not set, AC_PROG_CC in autoconf sets it to "-g -O2"
which is not what we want here.
you must NOT unset CFLAGS,
you must SET it to "" (an empty string)
like you do for every other gnu package that uses autoconf
and which you do not want to distribute with the debug symbols.


-- Additional comment from gemi on 2006-07-23 17:32 EST --
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > "clisp --version" insicates that it has beed built with debugging symbols.
> > > this is because clisp configure now respects the environment variable CFLAGS
> > > and when it is not set uses "-g -O2" as per GNU standards.
> > > please re-configure CLISP with CFLAGS="":
> > > CFLAGS="" ./configure ....
> > > thanks.
> > Currently CFLAGS is not set at all in the .spec file.
> > Could you explain, why unsetting CFLAGS is necessary?
> 
> when CFLAGS is not set, AC_PROG_CC in autoconf sets it to "-g -O2"
> which is not what we want here.
> you must NOT unset CFLAGS,
> you must SET it to "" (an empty string)
> like you do for every other gnu package that uses autoconf
> and which you do not want to distribute with the debug symbols.
> 
Could you open a separate bug report on this?

Comment 1 Gérard Milmeister 2006-07-24 14:52:09 UTC
It seems that without setting CFLAGS to "", the flags used are -O2 and -g and
with CFLAGS set to "", the flags is set to -O2 only. Given that ALL fedora
packages are built with debugging enabled, I don't see why we should disable
it.

Comment 2 Sam Steingold 2006-07-24 14:56:57 UTC
emacs comes without debugging symbols:

gdb /usr/bin/emacs-21.4-x
(no debugging symbols found)


Comment 3 Gérard Milmeister 2006-07-24 15:30:58 UTC
The binaries in RPM packages are stripped of course, but a
debuginfo package is generated from the the sources and
the binaries using the debugging symbols.

Comment 4 Sam Steingold 2006-07-24 15:46:17 UTC
I see, so first the executable is built with "-g" and then it is stripped.
this is not good for clisp:
this prevents disassembling natively compiled functions:
> (disassemble #'car)
0x00cfe402 in __kernel_vsyscall ()
0x080b8f28 <C_car+0>:   push   %ebp
0x080b8f29 <C_car+1>:   lea    0xfffffffc(%ebx),%eax
0x080b8f2c <C_car+4>:   mov    %esp,%ebp
0x080b8f2e <C_car+6>:   mov    %eax,%ebx
0x080b8f30 <C_car+8>:   sub    $0x8,%esp
0x080b8f33 <C_car+11>:  mov    (%eax),%eax
0x080b8f35 <C_car+13>:  call   0x80b87b4 <car>
0x080b8f3a <C_car+18>:  movl   $0x1,0x81b0cd8
0x080b8f44 <C_car+28>:  mov    %eax,0x81b0d00
0x080b8f49 <C_car+33>:  leave
0x080b8f4a <C_car+34>:  ret

(this is with the CLISP compiled with CFLAGS="").
the CLISP RPM print the disassembly for the whole executable,
not just the CAR function.

Comment 5 Gérard Milmeister 2006-07-24 15:50:45 UTC
Ok, well, I will push an update with CFLAGS="" soon.


Note You need to log in before you can comment on or make changes to this bug.