Store CFLAGS in configure, fix build race condition and rabin2 -zz

- Try to fix the race condition in build
- Fixes for rabin2 -zz (show strings when opening an unknown file type)
- Store CFLAGS and LDFLAGS at configure stage
This commit is contained in:
pancake 2013-04-26 03:15:39 +02:00
parent 2a0b1707cb
commit 0aaa61f7d2
4 changed files with 15 additions and 8 deletions

View File

@ -14,6 +14,7 @@ endif
PWD=$(shell pwd)
all: plugins.cfg
${MAKE} shlr
${MAKE} libr
${MAKE} binr
@ -22,7 +23,7 @@ plugins.cfg:
echo " Please, run ./configure first" ; echo ; exit 1 ; fi
./configure-plugins
binr libr:
shlr binr libr:
cd $@ && ${MAKE} all
w32:
@ -61,7 +62,7 @@ w32dist:
zip -r radare2-w32-${VERSION}.zip radare2-w32-${VERSION}
clean:
for a in libr binr shlr ; do (cd $$a ; ${MAKE} clean) ; done
for a in shlr libr binr ; do (cd $$a ; ${MAKE} clean) ; done
distclean mrproper:
for a in libr binr shlr ; do ( cd $$a ; ${MAKE} mrproper) ; done

View File

@ -334,12 +334,14 @@ int main(int argc, char **argv) {
set_action (ACTION_SRCLINE);
break;
case 'i': set_action (ACTION_IMPORTS); break;
case 's': set_action(ACTION_SYMBOLS); break;
case 'S': set_action(ACTION_SECTIONS); break;
case 's': set_action (ACTION_SYMBOLS); break;
case 'S': set_action (ACTION_SECTIONS); break;
case 'z':
if (is_active (ACTION_STRINGS))
r_config_set_i (core.config, "bin.rawstr", 1);
set_action(ACTION_STRINGS);
if (is_active (ACTION_STRINGS)) {
r_config_set_i (core.config, "bin.rawstr", R_TRUE);
core.bin->cur.rawstr = R_TRUE;
}
set_action (ACTION_STRINGS);
break;
case 'Z': set_action (ACTION_SIZE); break;
case 'I': set_action (ACTION_INFO); break;

View File

@ -56,3 +56,7 @@ SSL_CFLAGS=@SSL_CFLAGS@
SSL_LDFLAGS=@SSL_LDFLAGS@
GIT_TIP=$(shell git log HEAD^..HEAD|head -n1|cut -d ' ' -f2)
# cache compiler flags at configure time #
CFLAGS+=@CFLAGS@
LDFLAGS+=@LDFLAGS@

View File

@ -16,7 +16,7 @@ static int bin_strings (RCore *r, int mode, ut64 baddr, int va) {
if (!r->bin->cur.curplugin) return 0;
if (!r->bin->cur.curplugin->info) {
if (!r_config_get_i (r->config, "bin.rawstr")) {
eprintf ("WARNING: Use 'e bin.rawstr=true' to"
eprintf ("WARN: Use '-e bin.rawstr=true' or 'rabin2 -zz' to"
" find strings on unknown filetypes\n");
return 0;
}