From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 23 Oct 2011 19:11:26 +0200 Subject: [U-Boot] [RESEND PATCH v3] Add assert() for debug assertions In-Reply-To: References: <1315434680-21641-1-git-send-email-sjg@chromium.org> <20111021222026.4F3FA18AE81D@gemini.denx.de> Message-ID: <20111023171126.B5F2A137213A@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike Frysinger, In message you wrote: > > >> +void __assert_fail(const char *assertion, const char *file, unsigned line, > >> + const char *function) > >> +{ > >> + /* This will not return */ > >> + panic("%s:%u: %s: Assertion `%s' failed.", file, line, function, > >> + assertion); > >> +} > > > > Can you please #ifdef it so it doesn't get added for the non-debug > > case, too? > > most arches are building with --gc-sections now which means there is > no overhead added for them. should we look at fixing the few holdouts > rather than adding #ifdefs ? I think Power does use --gc-sections, still I see code size growing. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de All your people must learn before you can reach for the stars. -- Kirk, "The Gamesters of Triskelion", stardate 3259.2