Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #004645

  • 2 - Fair

  • Confirmed

Issue Confirmations

  • Yes (1)No (0)
Photo

[patch] configure handles -g switch wrong

Posted by Hercules Bot on 16 December 2010 - 12:57 AM

Originally posted by Harbin
http://www.eathena.w...er&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

Originally posted by Ind
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

Originally posted by Sirius_Black
Ill take the responsibility of that issue.

More information within the next 24h :)


Thanks for the report / submitted patch ^^;


Greetings,
Florian

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:
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"

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.

Edited by Valo, 01 October 2014 - 02:59 AM.