Gdbinit icon indicating copy to clipboard operation
Gdbinit copied to clipboard

Remove path from nasm references

Open tyilo opened this issue 12 years ago • 3 comments

Mac OS X seems to come with nasm in /usr/bin and I also have nasm from MacPorts in /opt/local/bin.

I don't know why you both reference nasm in both /usr/bin and /usr/local/bin, but it should now work with any path.

tyilo avatar Jul 08 '13 17:07 tyilo

OS X default nasm does not assemble 64 bits. The /usr/local/bin path is the default for compiling latest NASM from the source since I don't use MacPorts. Not sure if path to nasm can be added as a configurable option.

gdbinit avatar Jul 08 '13 17:07 gdbinit

You're right.

Could you use something like this to determine the latest version of nasm installed:

shell type -aP nasm | while read line; do echo $("$line" -v | cut -f 3 -d ' ') "$line"; done | sort -t '.' -g | tail -1 | cut -f 2 -d ' '

tyilo avatar Jul 08 '13 19:07 tyilo

Or you could just use

shell nasms=("/usr/local/bin" "/opt/local/bin" "/usr/bin"); for i in ${nasms[@]}; do if [[ -f "$i/nasm" ]]; then echo "$i/nasm"; break; fi; done

tyilo avatar Jul 08 '13 19:07 tyilo