Bug 199887 - clisp.spec must set CFLAGS=""
clisp.spec must set CFLAGS=""
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: clisp (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Gérard Milmeister
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-23 20:13 EDT by Sam Steingold
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-28 14:12:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sam Steingold 2006-07-23 20:13:17 EDT
+++ 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@gnu.org 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@bluewin.ch 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 10:52:09 EDT
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 10:56:57 EDT
emacs comes without debugging symbols:

gdb /usr/bin/emacs-21.4-x
(no debugging symbols found)
Comment 3 Gérard Milmeister 2006-07-24 11:30:58 EDT
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 11:46:17 EDT
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 11:50:45 EDT
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.