DS had issues when he was younger with constipation/DIOS. He'd still stool, but when he got plugged up, it'd be very loose and his tummy would get very distended, his eating would decrease and sometimes he'd vomit. So we'd have to use a laxative --- cherry milk of magnesia worked for us. His doctor indicated after xrays that he had a large amount of stool in his colon and what he was stooling, was just working it's way around the major stuff.
When he got older, his eating decreased, he'd eat a few bites and say he was full. Sometimes if he ate very well, he'd throw it up. Once he at a happy meal and barfed it up in the car 6 hours later. Little bits of French fries everywhere. In his case, he'd had surgery as a newborn for a blockage caused by meconium ileus and apparently there was scar tissue/adhesions that slowed down his digestion and prevented his enzymes from getting where they were supposed to go in a timely manner. Eventually he ended up with a blockage and surgeons had to remove the adhesions. And it did the trick. He was able to eat more, stools were actually normal.... The only reason I'm sharing this with you is because we struggled for a long time, probably the first 6 years of his life with trying to get food in him and maintain a normal weight. We tried everything -- a log with what he ate, what came out, what meds he'd been taking (we'd thought at first it was his azithromycin) to find a common theme....
I'd also visit with your CF clinic, see if they has a gastro specialist. Could be enzymes need to be adjusted, could be he needs a laxative on a regular basis....