If you give it to him before you die, his cost basis in the property will be your cost basis - whatever you paid for it plus the expenses of the purchase that you can document from the closing statement, plus any capital improvements you made - that you have receipts for - while you owned it.
So let's say you paid $40k for it, paid $1,000 in purchase expenses, put two roofs on it, replaced the furnace, replaced two water heaters, put siding on the house, remodeled the kitchen and bathroom(s) - and spent $74k doing all of that. Your cost basis is $115k. If the house is worth $300k today and your son sold it for that much after his expenses of the sale, then he has a capital gain of $185k. Unfortunately, you get no credit for the inflation factor on those years of ownership and the money spent on those improvements. Now, if he lives in the house for at least two years before he sells it, he will get the homeowner's exemption. If not, then he will be facing the capital gains tax.
However, if you leave it to him in your estate instead of giving it to him while you live, his cost basis will be its market value when you die. There won't be any tax issues if he sells within a short time after that. Any increase in value from that point he may be taxed on.