The script was using a few deprecated things according to POSIX:
- -o instead of ||
- egrep
- `` instead of $()
I removed those for their "modern" equivalents. Hopefully no buildfarm
member complains. I can remove any of those patches though. I did go
ahead and remove egrep usage from the entire codebase while I was at it.
There is still a configure check though. I'm thinking that could also be
removed?
I moved system detection to use uname -s. I hope that isn't a big deal.
Not sure the best way to identify Mac otherwise.
The big patch here is adding support for Mac. objdump -W doesn't work on
Mac. So, I used dsymutil and dwarfdump to achieve the same result. I am
not someone who ever uses awk, so someone should definitely check my
work there. I can only confirm this works on the latest version of Mac,
and have no clue how backward compatible it is. I also wrote this
without having a Mac. I had to ping a coworker with a Mac for help.
My goal with the Mac support is to enable use of find_typedef for
extension developers, where using a Mac might be more prominent than
upstream Postgres development, but that is just a guess.
--
Tristan Partin
Neon (https://neon.tech)