From Old Frenchcompaing, compain, from Late Latincompāniō (nominative form) (compare also Italian compagno), from com- +pānis (literally, with + bread), a word first attested in the FrankishLex Salica as a translation of a Germanic word, probably Frankish*galaibo, *gahlaibo(“messmate”, literally “with-bread”), from *hlaib(“loaf, bread”). See also compagnon, from the accusative form of the same Late Latin term (compāniōnem), from whence also English companion. The boyfriend meaning is by ellipsis of petit copain