I read that the primary amine product of Gabriel Synthesis is a racemic mixture. However, when analyzing the reaction the stereochemical step(s) are all $S_N2$. Thus, I figured if you are careful you can track the stereochemistry of the (or both) $S_N2$ reaction(s). Can anyone clarify this for me?
The lower part of the Dutch wikipedia about the Gabrielsynthese indeed displays an example where this reaction is carried out to yield a secondary amine:
The original publication (DOI: 10.1021/jm9804376, J. Med. Chem., 1999, 42, 593-600) equally includes similar conversions with racemic secondary substrates like (R/S)-($\pm$)-1-methylpentyl bromide to yield (R/S)-($\pm$)-N-(1-methylpentyl)phthalimide which in turn was then converted into (R/S)-($\pm$)-(1-methylpentyl)amine hydrochloride.