Issue information

Issue ID
#4645
Status
Confirmed
Severity
Fair
Started
Hercules Elf Bot
Dec 16, 2010 0:57
Last Post
Valo
Sep 30, 2014 23:41
Confirmation
Yes (1)
No (0)

Hercules Elf Bot - Dec 16, 2010 0:57

Originally posted by [b]Harbin[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4645

Patch => http://pastebin.com/CRvSxJQe

This fixes -g flag being enabled regardless of --enable-debug switch status, and also enables --enable-debug by default + simplifies CFLAG hassle a bit.

This post has been edited by Harbin: Dec 15 2010, 04:58 PM

Hercules Elf Bot - Dec 6, 2011 16:47

Originally posted by [b]Ind[/b]
I'll confirm because it seems legit to me, but I'll not fix because I'm not so skilled in shell lang. hopefully a skilled dev in this area will look into this issue and get it fixed

Hercules Elf Bot - Jun 1, 2012 22:44

Originally posted by [b]Sirius_Black[/b]
Ill take the responsibility of that issue.

More information within the next 24h :)


Thanks for the report / submitted patch ^^;


Greetings,
Florian

Valo - Sep 30, 2014 23:41

This is still an issue as of the latest version.
AC_PROG_CC overrides CFLAGS with -g -O2. The solution is saving the user set CFLAGS before calling AC_PROG_CC then readding them to the created CFLAGS.
like so:[code=nocode:454] OLD_CFLAGS="$CFLAGS" AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_CPP AC_PATH_PROG(AR, ar) AC_LANG([C]) CFLAGS="$OLD_CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare" [/code]

Also there is another issue with enable-debug. It only adds the -g flag to the CFLAGS not to the LDFLAGS. This obviously makes no sense at all.

This post has been edited by Valo on Oct 1, 2014 2:59