shanty (n.1)
"rough cabin," 1820, from Canadian French chantier "lumberjack's headquarters," in French, "timberyard, dock," from Old French chantier "gantry," from Latin cantherius "rafter, frame" (see gantry). Shanty Irish in reference to the Irish underclass in the U.S., is from 1928 (title of a book by Jim Tully).
shanty (n.2)
"sea song," 1867, alternative spelling of chanty (n.).